Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Bomb only sets first round

  1. #1

    Default Bomb only sets first round

    Edit: The original post below has been solved. I will continue to upload maps to this thread as they are fixed.

    Hey guys while playing this map we found that the bombs only seem to set on the first round. Looking at the SCR file, do you see any reason for that? I cannot find anything myself. We are running a windows server, with the latest reborn patch and mefy's FT mod. The FT mod does not affect the bombs setting.

    Here's the map if anyone wants to look at it. http://www.mohaaaa.co.uk/AAAAMOHAA/c...3mini-compound
    //==========================================================================================================================
    //==========================================================================================================================
    //      MAP: G3mInI Compound
    //      ARCHITECTURE: G3mInI
    //      HACKING/SCRIPTING: G3mInI
    //      SPECIAL THANKS: ALLIEDASSAULT.COM FORUMS -- SCORPIOMIDGET FOR DECOMPILING SOME MAPS -- AND ANYONE ELSE I MAY HAVE FORGOT :)
    //      NOTE: THIS MAP SHOWS UP IN SERVER LIST AS 'COMPLEX4'
    //==========================================================================================================================
    //==========================================================================================================================
    
    //====================
    //      MAIN LEVEL SCRIPT
    //====================
    main:
    	level.script = maps/obj/complex4.scr
    
    	thread fogout5
    	thread fogout6
    	thread fogout7
    	thread fogout8
    	thread fogout9
    
    	setcvar "g_obj_alliedtext1" "Destroy the Comm."
    	setcvar "g_obj_alliedtext2" "Room. Destroy the"
    	setcvar "g_obj_alliedtext3" "Battery Room"
    	setcvar "g_obj_axistext1" "Defend the Comm."
    	setcvar "g_obj_axistext2" "Room. Defend the"
    	setcvar "g_obj_axistext3" "Battery Room"
    
    	setcvar "g_scoreboardpic" "g3mini_compound"
    
    	level waittill prespawn
    
    	$world farplane_color ".1 .1 .12"
    	level.fogplane = 2400
    	$world farplane level.fogplane
    
    	$spark1 hide
    	$spark2 hide
    	$spark3 hide
    
    	exec global/alarmlight.scr
    	exec global/door_locked.scr::lock
    	exec global/ambient.scr complex4
    	exec global/bomber.scr
    
    	thread global/exploder.scr::main
    	thread maps/obj/complex_minefield.scr::minefield_setup
    
    	level waittill spawn
    
    	fadein 4 0 0 0 1
    	wait 2
    
    	level.defusing_team = "axis"
    	level.planting_team = "allies"
    	level.bomb_damage = 200
    	level.bomb_explosion_radius = 2048
    
    	// set the parameters for round based match
    	level.dmrespawning = 1 // 1 or 0
    	level.dmroundlimit = 10 // round time limit in minutes
    	level.clockside = axis // set to axis, allies, kills, or draw
    
    
    	level.rain_speed = "66"
    	level.rain_speed_vary = "16"
    	level.rain_length = "2"
    	level.rain_width = "1"
    	level.rain_density = ".16"
    	level.rain_slant = "250"
    	level.rain_min_dist = "2800"
    	//level.rain_min_dist = "512"
    	level.rain_numshaders = 12
    	level.rain_shader = "textures/snow1"
    
    
    //==========================
    //          INITIATE LEVEL THREADS
    //==========================
    	thread level_setup
    	thread doors1
    	thread doors2
    	thread ceiling_fans
    	thread fogin1
    	thread fogin2
    	thread fogin3
    	thread fogin4
    	thread random_explode1
    	thread random_explode2
    	thread random_explode3
    	thread random_explode4
    	thread random_explode5
    	thread random_explode6
    	thread random_explode7
    	thread random_explode8
    	thread random_explode9
    	thread random_explode10
    	thread random_explode11
    	thread random_explode12
    	thread flyby
    	thread sparks1
    	thread sparks2
    	thread sparks3
    	thread elevator1
    	thread elevator2
    
    //==================================
    //          WAIT FOR PLAYERS ON EACH SIDE
    //==================================
    
    	level waittill roundstart
    
    //=====================
    //          SETUP THE BOMBS
    //=====================
    
    	$ctrlroom_explode thread global/obj_dm.scr::bomb_thinker
    	$btryroom_explode thread global/obj_dm.scr::bomb_thinker
    
    	thread allies_win_bomb $ctrlroom_explode $btryroom_explode
    	$ctrlroom_explode thread axis_win_timer
    
    	thread bomb1_exploded $ctrlroom_explode
    	thread bomb2_exploded $btryroom_explode
    end
    
    //=======================
    //      BEGIN LEVEL THREADS
    //=======================
    
    allies_win_bomb local.bomb1 local.bomb2:
    
    	while (local.bomb1.exploded != 1)
    		wait .1
    	while (local.bomb2.exploded != 1)
    		wait .1
    
    	teamwin allies
    end
    
    axis_win_timer:
    
    	level waittill axiswin
    
    end
    
    //=========================================
    //          COMMUNICATIONS ROOM BOMB EXPLODED
    //=========================================
    
    bomb1_exploded local.bomb1:
    
    	while (local.bomb1.exploded != 1)
    
    		wait .1
    
    		iprintlnbold "Allies have destroyed the Communicatons Room!"
    
    		$ceiling_fan1 rotatey 0
    		$ceiling_fan2 rotatey 0
    		$ceiling_fan3 rotatey 0
    		$ceiling_fan4 rotatey 0
    end
    
    
    //=================================
    //          BATTERY ROOM BOMB EXPLODED
    //=================================
    
    bomb2_exploded local.bomb2:
    
    	while (local.bomb2.exploded != 1)
    
    		wait .1
    
    		iprintlnbold "Allies have destroyed the Battery Room!"
    
    		$ceiling_fan5 rotatey 0
    		$ceiling_fan6 rotatey 0
    		$ceiling_fan7 rotatey 0
    		$ceiling_fan8 rotatey 0
    end
    
    //===================================
    //          SETUP THE FLASHING ALARMLIGHTS
    //===================================
    
    level_setup:
    
    	level.alarmlights = 1
    
    
    //=========================================
    //      THREADS FOR ALL SCRIPTED DOORS IN LEVEL
    //=========================================
    
    doors1:
    	thread door1
    	thread door1a
    	thread door2
    	thread door2a
    	thread door3
    	thread door3a
    	thread door4
    	thread door4a
    	thread door5
    	thread door5a
    	thread door6
    	thread door6a
    	thread door7
    	thread door7a
    	thread door8
    	thread door8a
    end
    
    doors2:
    	thread door9
    	thread door9a
    	thread door10
    	thread door10a
    	thread door11
    	thread door11a
    	thread door12
    	thread door12a
    	thread door13
    	thread door13a
    	thread door14
    	thread door14a
    	thread door15
    	thread door15a
    	thread door16
    	thread door16a
    end
    
    //=================
    //      DOOR #1 SCRIPT
    //=================
    
    door1:
    	$doortop1 time 1
    	$doorbottom1 time 1
    	$doorswitch1 anim off
    	$door1 waittill trigger
    	$door1a nottriggerable
    	$doorswitch1 anim turn
    	$doorswitch1 playsound alarm_switch
    	wait .5
    	thread doortop1
    	thread doorbottom1
    end
    
    door1a:
    	$doortop1 time 1
    	$doorbottom1 time 1
    	$doorswitch1a anim off
    	$door1a waittill trigger
    	$door1 nottriggerable
    	$doorswitch1a anim turn
    	$doorswitch1a playsound alarm_switch
    	wait .5
    	thread doortop1
    	thread doorbottom1
    end
    
    doortop1:
    
    	$doortop1 moveup 64
    	$doortop1 waitmove
    	$doortop1 playsound door_metal_close_stop4
    	wait 3
    	$doortop1 movedown 64
    	$doortop1 waitmove
    	$doortop1 playsound door_metal_close_stop4
    	$door1 triggerable
    	thread doors1
    end
    
    doorbottom1:
    
    	$doorbottom1 movedown 64
    	$doorbottom1 playsound gate_iron_open3
    	$doorbottom1 waitmove
    	wait 3
    	$doorbottom1 moveup 64
    	$doorbottom1 playsound gate_iron_open3
    	$doorbottom1 waitmove
    	$door1a triggerable
    	thread doors1
    end
    
    //=================
    //      DOOR #2 SCRIPT
    //=================
    
    door2:
    	$doortop2 time 1
    	$doorbottom2 time 1
    	$doorswitch2 anim off
    	$door2 waittill trigger
    	$door2a nottriggerable
    	$doorswitch2 anim turn
    	$doorswitch2 playsound alarm_switch
    	wait .5
    	thread doortop2
    	thread doorbottom2
    end
    
    door2a:
    
    	$doortop2 time 1
    	$doorbottom2 time 1
    	$doorswitch2a anim off
    	$door2a waittill trigger
    	$door2 nottriggerable
    	$doorswitch2a anim turn
    	$doorswitch2a playsound alarm_switch
    	wait .5
    	thread doortop2
    	thread doorbottom2
    
    doortop2:
    
    	$doortop2 moveup 64
    	$doortop2 waitmove
    	$doortop2 playsound door_metal_close_stop4
    	wait 3
    	$doortop2 movedown 64
    	$doortop2 waitmove
    	$doortop2 playsound door_metal_close_stop4
    	$door2 triggerable
    	thread doors1
    end
    
    doorbottom2:
    
    	$doorbottom2 movedown 64
    	$doorbottom2 playsound gate_iron_open3
    	$doorbottom2 waitmove
    	wait 3
    	$doorbottom2 moveup 64
    	$doorbottom2 playsound gate_iron_open3
    	$doorbottom2 waitmove
    	$door2a triggerable
    	thread doors1
    end
    
    //=================
    //      DOOR #3 SCRIPT
    //=================
    
    door3:
    	$doortop3 time 1
    	$doorbottom3 time 1
    	$doorswitch3 anim off
    	$door3 waittill trigger
    	$door3a nottriggerable
    	$doorswitch3 anim turn
    	$doorswitch3 playsound alarm_switch
    	wait .5
    	thread doortop3
    	thread doorbottom3
    end
    
    door3a:
    	$doortop3 time 1
    	$doorbottom3 time 1
    	$doorswitch3a anim off
    	$door3a waittill trigger
    	$door3 nottriggerable
    	$doorswitch3a anim turn
    	$doorswitch3a playsound alarm_switch
    	wait .5
    	thread doortop3
    	thread doorbottom3
    end
    
    doortop3:
    
    	$doortop3 moveup 64
    	$doortop3 waitmove
    	$doortop3 playsound door_metal_close_stop4
    	wait 3
    	$doortop3 movedown 64
    	$doortop3 waitmove
    	$doortop3 playsound door_metal_close_stop4
    	$door3 triggerable
    	thread doors1
    end
    
    doorbottom3:
    
    	$doorbottom3 movedown 64
    	$doorbottom3 playsound gate_iron_open3
    	$doorbottom3 waitmove
    	wait 3
    	$doorbottom3 moveup 64
    	$doorbottom3 playsound gate_iron_open3
    	$doorbottom3 waitmove
    	$door3a triggerable
    	thread doors1
    end
    
    //=================
    //      DOOR #4 SCRIPT
    //=================
    
    door4:
    	$doortop4 time 1
    	$doorbottom4 time 1
    	$doorswitch4 anim off
    	$door4 waittill trigger
    	$door4a nottriggerable
    	$doorswitch4 anim turn
    	$doorswitch4 playsound alarm_switch
    	wait .5
    	thread doortop4
    	thread doorbottom4
    end
    
    door4a:
    	$doortop4 time 1
    	$doorbottom4 time 1
    	$doorswitch4a anim off
    	$door4a waittill trigger
    	$door4 nottriggerable
    	$doorswitch4a anim turn
    	$doorswitch4a playsound alarm_switch
    	wait .5
    	thread doortop4
    	thread doorbottom4
    end
    
    doortop4:
    
    	$doortop4 moveup 64
    	$doortop4 waitmove
    	$doortop4 playsound door_metal_close_stop4
    	wait 3
    	$doortop4 movedown 64
    	$doortop4 waitmove
    	$doortop4 playsound door_metal_close_stop4
    	$door4 triggerable
    	thread doors1
    end
    
    doorbottom4:
    
    	$doorbottom4 movedown 64
    	$doorbottom4 playsound gate_iron_open3
    	$doorbottom4 waitmove
    	wait 3
    	$doorbottom4 moveup 64
    	$doorbottom4 playsound gate_iron_open3
    	$doorbottom4 waitmove
    	$door4a triggerable
    	thread doors1
    end
    
    //=================
    //      DOOR #5 SCRIPT
    //=================
    
    door5:
    	$doortop5 time 1
    	$doorbottom5 time 1
    	$doorswitch5 anim off
    	$door5 waittill trigger
    	$door5a nottriggerable
    	$doorswitch5 anim turn
    	$doorswitch5 playsound alarm_switch
    	wait .5
    	thread doortop5
    	thread doorbottom5
    end
    
    door5a:
    	$doortop5 time 1
    	$doorbottom5 time 1
    	$doorswitch5a anim off
    	$door5a waittill trigger
    	$door5 nottriggerable
    	$doorswitch5a anim turn
    	$doorswitch5a playsound alarm_switch
    	wait .5
    	thread doortop5
    	thread doorbottom5
    end
    
    doortop5:
    
    	$doortop5 moveup 64
    	$doortop5 waitmove
    	$doortop5 playsound door_metal_close_stop4
    	wait 3
    	$doortop5 movedown 64
    	$doortop5 waitmove
    	$doortop5 playsound door_metal_close_stop4
    	$door5 triggerable
    	thread doors1
    end
    
    doorbottom5:
    
    	$doorbottom5 movedown 64
    	$doorbottom5 playsound gate_iron_open3
    	$doorbottom5 waitmove
    	wait 3
    	$doorbottom5 moveup 64
    	$doorbottom5 playsound gate_iron_open3
    	$doorbottom5 waitmove
    	$door5a triggerable
    	thread doors1
    end
    
    //=================
    //      DOOR #6 SCRIPT
    //=================
    
    door6:
    	$doortop6 time 1
    	$doorbottom6 time 1
    	$doorswitch6 anim off
    	$door6 waittill trigger
    	$door6a nottriggerable
    	$doorswitch6 anim turn
    	$doorswitch6 playsound alarm_switch
    	wait .5
    	thread doortop6
    	thread doorbottom6
    end
    
    door6a:
    	$doortop6 time 1
    	$doorbottom6 time 1
    	$doorswitch6a anim off
    	$door6a waittill trigger
    	$door6 nottriggerable
    	$doorswitch6a anim turn
    	$doorswitch6a playsound alarm_switch
    	wait .5
    	thread doortop6
    	thread doorbottom6
    end
    
    doortop6:
    
    	$doortop6 moveup 64
    	$doortop6 waitmove
    	$doortop6 playsound door_metal_close_stop4
    	wait 3
    	$doortop6 movedown 64
    	$doortop6 waitmove
    	$doortop6 playsound door_metal_close_stop4
    	$door6 triggerable
    	thread doors1
    end
    
    doorbottom6:
    
    	$doorbottom6 movedown 64
    	$doorbottom6 playsound gate_iron_open3
    	$doorbottom6 waitmove
    	wait 3
    	$doorbottom6 moveup 64
    	$doorbottom6 playsound gate_iron_open3
    	$doorbottom6 waitmove
    	$door6a triggerable
    	thread doors1
    end
    
    //=================
    //      DOOR #7 SCRIPT
    //=================
    
    door7:
    	$doortop7 time 1
    	$doorbottom7 time 1
    	$doorswitch7 anim off
    	$door7 waittill trigger
    	$door7a nottriggerable
    	$doorswitch7 anim turn
    	$doorswitch7 playsound alarm_switch
    	wait .5
    	thread doortop7
    	thread doorbottom7
    end
    
    door7a:
    	$doortop7 time 1
    	$doorbottom7 time 1
    	$doorswitch7a anim off
    	$door7a waittill trigger
    	$door7 nottriggerable
    	$doorswitch7a anim turn
    	$doorswitch7a playsound alarm_switch
    	wait .5
    	thread doortop7
    	thread doorbottom7
    end
    
    doortop7:
    
    	$doortop7 moveup 64
    	$doortop7 waitmove
    	$doortop7 playsound door_metal_close_stop4
    	wait 3
    	$doortop7 movedown 64
    	$doortop7 waitmove
    	$doortop7 playsound door_metal_close_stop4
    	$door7 triggerable
    	thread doors1
    end
    
    doorbottom7:
    
    	$doorbottom7 movedown 64
    	$doorbottom7 playsound gate_iron_open3
    	$doorbottom7 waitmove
    	wait 3
    	$doorbottom7 moveup 64
    	$doorbottom7 playsound gate_iron_open3
    	$doorbottom7 waitmove
    	$door7a triggerable
    	thread doors1
    end
    
    //=================
    //      DOOR #8 SCRIPT
    //=================
    
    door8:
    	$doortop8 time 1
    	$doorbottom8 time 1
    	$doorswitch8 anim off
    	$door8 waittill trigger
    	$door8a nottriggerable
    	$doorswitch8 anim turn
    	$doorswitch8 playsound alarm_switch
    	wait .5
    	thread doortop8
    	thread doorbottom8
    end
    
    door8a:
    	$doortop8 time 1
    	$doorbottom8 time 1
    	$doorswitch8a anim off
    	$door8a waittill trigger
    	$door8 nottriggerable
    	$doorswitch8a anim turn
    	$doorswitch8a playsound alarm_switch
    	wait .5
    	thread doortop8
    	thread doorbottom8
    end
    
    doortop8:
    
    	$doortop8 moveup 64
    	$doortop8 waitmove
    	$doortop8 playsound door_metal_close_stop4
    	wait 3
    	$doortop8 movedown 64
    	$doortop8 waitmove
    	$doortop8 playsound door_metal_close_stop4
    	$door8 triggerable
    	thread doors1
    end
    
    doorbottom8:
    
    	$doorbottom8 movedown 64
    	$doorbottom8 playsound gate_iron_open3
    	$doorbottom8 waitmove
    	wait 3
    	$doorbottom8 moveup 64
    	$doorbottom8 playsound gate_iron_open3
    	$doorbottom8 waitmove
    	$door8a triggerable
    	thread doors1
    end
    
    //=================
    //      DOOR #9 SCRIPT
    //=================
    
    door9:
    	$doortop9 time 1
    	$doorbottom9 time 1
    	$doorswitch9 anim off
    	$door9 waittill trigger
    	$door9a nottriggerable
    	$doorswitch9 anim turn
    	$doorswitch9 playsound alarm_switch
    	wait .5
    	thread doortop9
    	thread doorbottom9
    end
    
    door9a:
    	$doortop9 time 1
    	$doorbottom9 time 1
    	$doorswitch9a anim off
    	$door9a waittill trigger
    	$door9 nottriggerable
    	$doorswitch9a anim turn
    	$doorswitch9a playsound alarm_switch
    	wait .5
    	thread doortop9
    	thread doorbottom9
    end
    
    doortop9:
    
    	$doortop9 moveup 64
    	$doortop9 waitmove
    	$doortop9 playsound door_metal_close_stop4
    	wait 3
    	$doortop9 movedown 64
    	$doortop9 waitmove
    	$doortop9 playsound door_metal_close_stop4
    	$door9 triggerable
    	thread doors2
    end
    
    doorbottom9:
    
    	$doorbottom9 movedown 64
    	$doorbottom9 playsound gate_iron_open3
    	$doorbottom9 waitmove
    	wait 3
    	$doorbottom9 moveup 64
    	$doorbottom9 playsound gate_iron_open3
    	$doorbottom9 waitmove
    	$door9a triggerable
    	thread doors2
    end
    
    //==================
    //      DOOR #10 SCRIPT
    //==================
    
    door10:
    	$doortop10 time 1
    	$doorbottom10 time 1
    	$doorswitch10 anim off
    	$door10 waittill trigger
    	$door10a nottriggerable
    	$doorswitch10 anim turn
    	$doorswitch10 playsound alarm_switch
    	wait .5
    	thread doortop10
    	thread doorbottom10
    end
    
    door10a:
    	$doortop10 time 1
    	$doorbottom10 time 1
    	$doorswitch10a anim off
    	$door10a waittill trigger
    	$door10 nottriggerable
    	$doorswitch10a anim turn
    	$doorswitch10a playsound alarm_switch
    	wait .5
    	thread doortop10
    	thread doorbottom10
    end
    
    doortop10:
    
    	$doortop10 moveup 64
    	$doortop10 waitmove
    	$doortop10 playsound door_metal_close_stop4
    	wait 3
    	$doortop10 movedown 64
    	$doortop10 waitmove
    	$doortop10 playsound door_metal_close_stop4
    	$door10 triggerable
    	thread doors2
    end
    
    doorbottom10:
    
    	$doorbottom10 movedown 64
    	$doorbottom10 playsound gate_iron_open3
    	$doorbottom10 waitmove
    	wait 3
    	$doorbottom10 moveup 64
    	$doorbottom10 playsound gate_iron_open3
    	$doorbottom10 waitmove
    	$door10a triggerable
    	thread doors2
    end
    
    //==================
    //      DOOR #11 SCRIPT
    //==================
    
    door11:
    	$doortop11 time 1
    	$doorbottom11 time 1
    	$doorswitch11 anim off
    	$door11 waittill trigger
    	$door11a nottriggerable
    	$doorswitch11 anim turn
    	$doorswitch11 playsound alarm_switch
    	wait .5
    	thread doortop11
    	thread doorbottom11
    end
    
    door11a:
    	$doortop11 time 1
    	$doorbottom11 time 1
    	$doorswitch11a anim off
    	$door11a waittill trigger
    	$door11 nottriggerable
    	$doorswitch11a anim turn
    	$doorswitch11a playsound alarm_switch
    	wait .5
    	thread doortop11
    	thread doorbottom11
    end
    
    doortop11:
    
    	$doortop11 moveup 64
    	$doortop11 waitmove
    	$doortop11 playsound door_metal_close_stop4
    	wait 3
    	$doortop11 movedown 64
    	$doortop11 waitmove
    	$doortop11 playsound door_metal_close_stop4
    	$door11 triggerable
    	thread doors2
    end
    
    doorbottom11:
    
    	$doorbottom11 movedown 64
    	$doorbottom11 playsound gate_iron_open3
    	$doorbottom11 waitmove
    	wait 3
    	$doorbottom11 moveup 64
    	$doorbottom11 playsound gate_iron_open3
    	$doorbottom11 waitmove
    	$door11a triggerable
    	thread doors2
    end
    
    //==================
    //      DOOR #12 SCRIPT
    //==================
    
    door12:
    	$doortop12 time 1
    	$doorbottom12 time 1
    	$doorswitch12 anim off
    	$door12 waittill trigger
    	$door12a nottriggerable
    	$doorswitch12 anim turn
    	$doorswitch12 playsound alarm_switch
    	wait .5
    	thread doortop12
    	thread doorbottom12
    end
    
    door12a:
    	$doortop12 time 1
    	$doorbottom12 time 1
    	$doorswitch12a anim off
    	$door12a waittill trigger
    	$door12 nottriggerable
    	$doorswitch12a anim turn
    	$doorswitch12a playsound alarm_switch
    	wait .5
    	thread doortop12
    	thread doorbottom12
    end
    
    doortop12:
    
    	$doortop12 moveup 64
    	$doortop12 waitmove
    	$doortop12 playsound door_metal_close_stop4
    	wait 3
    	$doortop12 movedown 64
    	$doortop12 waitmove
    	$doortop12 playsound door_metal_close_stop4
    	$door12 triggerable
    	thread doors2
    end
    
    doorbottom12:
    
    	$doorbottom12 movedown 64
    	$doorbottom12 playsound gate_iron_open3
    	$doorbottom12 waitmove
    	wait 3
    	$doorbottom12 moveup 64
    	$doorbottom12 playsound gate_iron_open3
    	$doorbottom12 waitmove
    	$door12a triggerable
    	thread doors2
    end
    
    //==================
    //      DOOR #13 SCRIPT
    //==================
    
    door13:
    	$doortop13 time 1
    	$doorbottom13 time 1
    	$doorswitch13 anim off
    	$door13 waittill trigger
    	$door13a nottriggerable
    	$doorswitch13 anim turn
    	$doorswitch13 playsound alarm_switch
    	wait .5
    	thread doortop13
    	thread doorbottom13
    end
    
    door13a:
    	$doortop13 time 1
    	$doorbottom13 time 1
    	$doorswitch13a anim off
    	$door13a waittill trigger
    	$door13 nottriggerable
    	$doorswitch13a anim turn
    	$doorswitch13a playsound alarm_switch
    	wait .5
    	thread doortop13
    	thread doorbottom13
    end
    
    doortop13:
    
    	$doortop13 moveup 64
    	$doortop13 waitmove
    	$doortop13 playsound door_metal_close_stop4
    	wait 3
    	$doortop13 movedown 64
    	$doortop13 waitmove
    	$doortop13 playsound door_metal_close_stop4
    	$door13 triggerable
    	thread doors2
    end
    
    doorbottom13:
    
    	$doorbottom13 movedown 64
    	$doorbottom13 playsound gate_iron_open3
    	$doorbottom13 waitmove
    	wait 3
    	$doorbottom13 moveup 64
    	$doorbottom13 playsound gate_iron_open3
    	$doorbottom13 waitmove
    	$door13a triggerable
    	thread doors2
    end
    
    //==================
    //      DOOR #14 SCRIPT
    //==================
    
    door14:
    	$doortop14 time 1
    	$doorbottom14 time 1
    	$doorswitch14 anim off
    	$door14 waittill trigger
    	$door14a nottriggerable
    	$doorswitch14 anim turn
    	$doorswitch14 playsound alarm_switch
    	wait .5
    	thread doortop14
    	thread doorbottom14
    end
    
    door14a:
    	$doortop14 time 1
    	$doorbottom14 time 1
    	$doorswitch14a anim off
    	$door14a waittill trigger
    	$door14 nottriggerable
    	$doorswitch14a anim turn
    	$doorswitch14a playsound alarm_switch
    	wait .5
    	thread doortop14
    	thread doorbottom14
    end
    
    doortop14:
    
    	$doortop14 moveup 64
    	$doortop14 waitmove
    	$doortop14 playsound door_metal_close_stop4
    	wait 3
    	$doortop14 movedown 64
    	$doortop14 waitmove
    	$doortop14 playsound door_metal_close_stop4
    	$door14 triggerable
    	thread doors2
    end
    
    doorbottom14:
    
    	$doorbottom14 movedown 64
    	$doorbottom14 playsound gate_iron_open3
    	$doorbottom14 waitmove
    	wait 3
    	$doorbottom14 moveup 64
    	$doorbottom14 playsound gate_iron_open3
    	$doorbottom14 waitmove
    	$door14a triggerable
    	thread doors2
    end
    
    //==================
    //      DOOR #15 SCRIPT
    //==================
    
    door15:
    	$doortop15 time 1
    	$doorbottom15 time 1
    	$doorswitch15 anim off
    	$door15 waittill trigger
    	$door15a nottriggerable
    	$doorswitch15 anim turn
    	$doorswitch15 playsound alarm_switch
    	wait .5
    	thread doortop15
    	thread doorbottom15
    end
    
    door15a:
    	$doortop15 time 1
    	$doorbottom15 time 1
    	$doorswitch15a anim off
    	$door15a waittill trigger
    	$door15 nottriggerable
    	$doorswitch15a anim turn
    	$doorswitch15a playsound alarm_switch
    	wait .5
    	thread doortop15
    	thread doorbottom15
    end
    
    doortop15:
    
    	$doortop15 moveup 64
    	$doortop15 waitmove
    	$doortop15 playsound door_metal_close_stop4
    	wait 3
    	$doortop15 movedown 64
    	$doortop15 waitmove
    	$doortop15 playsound door_metal_close_stop4
    	$door15 triggerable
    	thread doors2
    end
    
    doorbottom15:
    
    	$doorbottom15 movedown 64
    	$doorbottom15 playsound gate_iron_open3
    	$doorbottom15 waitmove
    	wait 3
    	$doorbottom15 moveup 64
    	$doorbottom15 playsound gate_iron_open3
    	$doorbottom15 waitmove
    	$door15a triggerable
    	thread doors2
    end
    
    //==================
    //      DOOR #16 SCRIPT
    //==================
    
    door16:
    	$doortop16 time 1
    	$doorbottom16 time 1
    	$doorswitch16 anim off
    	$door16 waittill trigger
    	$door16a nottriggerable
    	$doorswitch16 anim turn
    	$doorswitch16 playsound alarm_switch
    	wait .5
    	thread doortop16
    	thread doorbottom16
    end
    
    door16a:
    	$doortop16 time 1
    	$doorbottom16 time 1
    	$doorswitch16a anim off
    	$door16a waittill trigger
    	$door16 nottriggerable
    	$doorswitch16a anim turn
    	$doorswitch16a playsound alarm_switch
    	wait .5
    	thread doortop16
    	thread doorbottom16
    end
    
    doortop16:
    
    	$doortop16 moveup 64
    	$doortop16 waitmove
    	$doortop16 playsound door_metal_close_stop4
    	wait 3
    	$doortop16 movedown 64
    	$doortop16 waitmove
    	$doortop16 playsound door_metal_close_stop4
    	$door16 triggerable
    	thread doors2
    end
    
    doorbottom16:
    
    	$doorbottom16 movedown 64
    	$doorbottom16 playsound gate_iron_open3
    	$doorbottom16 waitmove
    	wait 3
    	$doorbottom16 moveup 64
    	$doorbottom16 playsound gate_iron_open3
    	$doorbottom16 waitmove
    	$door16a triggerable
    	thread doors2
    end
    
    //===============================================
    //      THREADS FOR ALL SCRIPTED CEILING FANS IN LEVEL
    //===============================================
    
    ceiling_fans:
    
    	thread ceiling_fan_comm_room
    	thread ceiling_fan_btry_room
    end
    
    //=================================
    //     CEILING FAN COMM. ROOM #1 SCRIPT
    //=================================
    
    ceiling_fan_comm_room:
    
    	$ceiling_fan1 rotatey 150
    	$ceiling_fan2 rotatey 150
    	$ceiling_fan3 rotatey 150
    	$ceiling_fan4 rotatey 150
    
    end
    
    //=================================
    //     CEILING FAN COMM. ROOM #2 SCRIPT
    //=================================
    
    ceiling_fan_btry_room:
    
    	$ceiling_fan5 rotatey 150
    	$ceiling_fan6 rotatey 150
    	$ceiling_fan7 rotatey 150
    	$ceiling_fan8 rotatey 150
    
    end
    
    //=========================
    //      TOGGLE THE FOG THREAD
    //=========================
    fogin1:
    	$fogintrig1 waittill trigger
    	thread fogramp 4000
    	thread fogout1
    end
    
    fogout1:
    	$fogouttrig1 waittill trigger
    	thread fogramp 2400
    	thread fogin1
    end
    
    fogin2:
    	$fogintrig2 waittill trigger
    	thread fogramp 4000
    	thread fogout2
    end
    
    fogout2:
    	$fogouttrig2 waittill trigger
    	thread fogramp 2400
    	thread fogin2
    end
    
    fogin3:
    	$fogintrig3 waittill trigger
    	thread fogramp 4000
    	thread fogout3
    end
    
    fogout3:
    	$fogouttrig3 waittill trigger
    	thread fogramp 2400
    	thread fogin3
    end
    
    fogin4:
    	$fogintrig4 waittill trigger
    	thread fogramp 4000
    	thread fogout4
    end
    
    fogout4:
    	$fogouttrig4 waittill trigger
    	thread fogramp 2400
    	thread fogin4
    end
    
    fogout5:
    	//println "SpawnFog trigger 5 waiting to be tripped"
    	$fogouttrig5 waittill trigger
    	//println "SpawnFog trigger 5 tripped"
    	waitthread fogramp 2400
    	goto fogout5
    end
    
    fogout6:
    	//println "SpawnFog trigger 6 waiting to be tripped"
    	$fogouttrig6 waittill trigger
    	//println "SpawnFog trigger 6 tripped"
    	waitthread fogramp 2400
    	goto fogout6
    end
    
    fogout7:
    	//println "SpawnFog trigger 7 waiting to be tripped"
    	$fogouttrig7 waittill trigger
    	//println "SpawnFog trigger 7 tripped"
    	waitthread fogramp 2400
    	goto fogout7
    end
    
    fogout8:
    	//println "SpawnFog trigger 8 waiting to be tripped"
    	$fogouttrig8 waittill trigger
    	//println "SpawnFog trigger 8 tripped"
    	waitthread fogramp 2400
    	goto fogout8
    end
    
    fogout9:
    	//println "SpawnFog trigger 9 waiting to be tripped"
    	$fogouttrig9 waittill trigger
    	//println "SpawnFog trigger 9 tripped"
    	waitthread fogramp 2400
    	goto fogout9
    end
    
    
    //=========================================================
    //      CHANGE THE FOG LEVEL WHEN ENTERING/EXITING THE COMPLEX
    //=========================================================
    
    fogramp local.rampto:
    	if (level.fogplane == local.rampto)
    	{
    		end
    	}
    	if (level.fogplane < local.rampto)
    	{
    		for (local.bleh = level.fogplane; local.bleh < local.rampto; local.bleh += 100)
    		{
    			level.fogplane = local.bleh
    			$world farplane level.fogplane
    			wait .01
    		}
    		end
    	}
    	if (level.fogplane > local.rampto)
    	{
    		for (local.bleh = level.fogplane; local.bleh > local.rampto; local.bleh -= 100)
    		{
    			level.fogplane = local.bleh
    			$world farplane level.fogplane
    			wait .01
    		}
    		end
    	}
    end
    
    
    //===============================
    //      RANDOM ARTILLERY EXPLOSIONS
    //===============================
    
    random_explode1:
    
    	wait (randomfloat 13 + 23)
    
    	$random_explode1_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode1 anim start
    	radiusdamage $random_explode1_origin 256 384
    
    	goto random_explode1
    
    random_explode2:
    
    	wait (randomfloat 7 + 20)
    
    	$random_explode2_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode2 anim start
    	radiusdamage $random_explode2_origin 256 384
    
    	goto random_explode2
    
    random_explode3:
    
    	wait (randomfloat 9 + 18)
    
    	$random_explode3_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode3 anim start
    	radiusdamage $random_explode3_origin 256 384
    
    	goto random_explode3
    
    random_explode4:
    
    	wait (randomfloat 12 + 18)
    
    	$random_explode4_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode4 anim start
    	radiusdamage $random_explode4_origin 256 384
    
    	goto random_explode4
    
    random_explode5:
    
    	wait (randomfloat 15 + 22)
    
    	$random_explode5_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode5 anim start
    	radiusdamage $random_explode5_origin 256 384
    
    	goto random_explode5
    
    random_explode6:
    
    	wait (randomfloat 11 + 19)
    
    	$random_explode6_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode6 anim start
    	radiusdamage $random_explode6_origin 256 384
    
    	goto random_explode6
    
    random_explode7:
    
    	wait (randomfloat 6 + 14)
    
    	$random_explode7_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode7 anim start
    	radiusdamage $random_explode7_origin 256 384
    
    	goto random_explode7
    
    random_explode8:
    
    	wait (randomfloat 8 + 17)
    
    	$random_explode8_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode8 anim start
    	radiusdamage $random_explode8_origin 256 384
    
    	goto random_explode8
    
    random_explode9:
    
    	wait (randomfloat 7 + 14)
    
    	$random_explode9_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode9 anim start
    	radiusdamage $random_explode9_origin 256 384
    
    	goto random_explode9
    
    random_explode10:
    
    	wait (randomfloat 13 + 21)
    
    	$random_explode10_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode10 anim start
    	radiusdamage $random_explode10_origin 256 384
    
    	goto random_explode10
    
    random_explode11:
    
    	wait (randomfloat 10 + 16)
    
    	$random_explode11_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode11 anim start
    	radiusdamage $random_explode11_origin 256 384
    
    	goto random_explode11
    
    random_explode12:
    
    	wait (randomfloat 6 + 10)
    
    	$random_explode12_origin playsound arty_leadinmp
    
    	wait 1
    
    	$random_explode12 anim start
    	radiusdamage $random_explode12_origin 256 384
    
    	goto random_explode12
    
    end
    
    //========================
    //      RANDOM PLANES FLYBY
    //========================
    
    flyby:
    	wait 1.0
    	thread global/bomber.scr::bomb 4
    	thread global/bomber.scr::bomb 5
    	thread global/bomber.scr::bomb 6
    	thread global/bomber.scr::bomb 7
    	wait (randomint(90) + 10)
    
    goto flyby
    
    end
    
    //=====================================
    //      SPARK SHOW ON POLE TRANSFORMERS
    //=====================================
    
    sparks1:
    	$spark1 show
    	wait 2
    	$spark1 hide
    	wait 4
    	$spark1 show
    	wait 2
    	$spark1 hide
    	wait 6
    	goto sparks1
    end
    
    sparks2:
    	$spark2 show
    	wait 2
    	$spark2 hide
    	wait 4
    	$spark2 show
    	wait 2
    	$spark2 hide
    	wait 6
    	goto sparks2
    end
    
    sparks3:
    	$spark3 show
    	wait 2
    	$spark3 hide
    	wait 4
    	$spark3 show
    	wait 2
    	$spark3 hide
    	wait 6
    	goto sparks3
    end
    
    //=====================
    //      ELEVATOR #1 SCRIPT
    //=====================
    
    elevator1:
    	$liftdoor1 bind $lift1
    	$liftdoor2 bind $lift1
    	$failsafe1 bind $lift1
    	$lift1 time 4
    	$liftdoor1 time 1
    	$liftdoor2 time 1
    	$liftdoortop1 time 1
    	$liftdoortop2 time 1
    	$liftdoorbottom1 time 1
    	$liftdoorbottom2 time 1
    	$lift1 moveto $lift1_bottom
    	$lift1 waitmove
    	thread eleswitch1
    	thread eleswitch2
    	thread failsafe1
    end
    
    eleswitch1:
    	$lift1switchbottom anim off
    	$lift1trigbottom waittill trigger
    	$lift1trigtop nottriggerable
    	$failsafe1 nottriggerable
    	$lift1switchbottom anim turn
    	$lift1switchbottom playsound alarm_switch
    	$lift1switchbottom nottriggerable
    	$lift1 moveto $lift1_bottom
    	$lift1 playsound elevator_run
    	$lift1 waitmove
    	thread elevatordoor1bottom
    	thread elevatordoor2bottom
    end
    
    elevatordoor1bottom:
    	$liftdoorbottom1 moveeast 80
    	$liftdoorbottom1 playsound door_metal_close_stop4
    	$liftdoorbottom1 waitmove
    	$liftdoor1 moveeast 80
    	$liftdoor1 playsound door_metal_close_stop4
    	$liftdoor1 waitmove
    	wait 5
    	$liftdoor1 movewest 80
    	$liftdoor1 playsound door_metal_close_stop4
    	$liftdoor1 waitmove
    	$liftdoorbottom1 movewest 80
    	$liftdoorbottom1 playsound door_metal_close_stop4
    	$liftdoorbottom1 waitmove
    	thread elevator1moveup
    end
    
    elevatordoor2bottom:
    	$liftdoorbottom2 movewest 80
    	$liftdoorbottom2 playsound gate_iron_open3
    	$liftdoorbottom2 waitmove
    	$liftdoor2 movewest 80
    	$liftdoor2 playsound gate_iron_open3
    	$liftdoor2 waitmove
    	wait 5
    	$liftdoor2 moveeast 80
    	$liftdoor2 playsound gate_iron_open3
    	$liftdoor2 waitmove
    	$liftdoorbottom2 moveeast 80
    	$liftdoorbottom2 playsound gate_iron_open3
    	$liftdoorbottom2 waitmove
    end
    
    elevator1moveup:
    	wait 2
    	$lift1 moveto $lift1_top
    	$lift1 playsound elevator_run
    	$lift1 waitmove
    	wait 2
    	thread elevatordoor1top
    	thread elevatordoor2top
    end
    
    elevatordoor1top:
    	$liftdoortop1 moveeast 80
    	$liftdoortop1 playsound door_metal_close_stop4
    	$liftdoortop1 waitmove
    	$liftdoor1 moveeast 80
    	$liftdoor1 playsound door_metal_close_stop4
    	$liftdoor1 waitmove
    	wait 5
    	$liftdoor1 movewest 80
    	$liftdoor1 playsound door_metal_close_stop4
    	$liftdoor1 waitmove
    	$liftdoortop1 movewest 80
    	$liftdoortop1 playsound door_metal_close_stop4
    	$liftdoortop1 waitmove
    	thread resetelevator
    end
    
    elevatordoor2top:
    	$liftdoortop2 movewest 80
    	$liftdoortop2 playsound gate_iron_open3
    	$liftdoortop2 waitmove
    	$liftdoor2 movewest 80
    	$liftdoor2 playsound gate_iron_open3
    	$liftdoor2 waitmove
    	wait 5
    	$liftdoor2 moveeast 80
    	$liftdoor2 playsound gate_iron_open3
    	$liftdoor2 waitmove
    	$liftdoortop2 moveeast 80
    	$liftdoortop2 playsound gate_iron_open3
    	$liftdoortop2 waitmove
    end
    
    eleswitch2:
    	$lift1switchtop anim off
    	$lift1trigtop waittill trigger
    	$lift1trigbottom nottriggerable
    	$failsafe1 nottriggerable
    	$lift1switchtop anim turn
    	$lift1switchtop playsound alarm_switch
    	$lift1switchtop nottriggerable
    	$lift1 moveto $lift1_top
    	$lift1 playsound elevator_run
    	$lift1 waitmove
    	thread elevatordoor1topa
    	thread elevatordoor2topa
    end
    
    elevatordoor1topa:
    	$liftdoortop1 moveeast 80
    	$liftdoortop1 playsound door_metal_close_stop4
    	$liftdoortop1 waitmove
    	$liftdoor1 moveeast 80
    	$liftdoor1 playsound door_metal_close_stop4
    	$liftdoor1 waitmove
    	wait 5
    	$liftdoor1 movewest 80
    	$liftdoor1 playsound door_metal_close_stop4
    	$liftdoor1 waitmove
    	$liftdoortop1 movewest 80
    	$liftdoortop1 playsound door_metal_close_stop4
    	$liftdoortop1 waitmove
    	thread elevator1movedowna
    end
    
    elevatordoor2topa:
    	$liftdoortop2 movewest 80
    	$liftdoortop2 playsound gate_iron_open3
    	$liftdoortop2 waitmove
    	$liftdoor2 movewest 80
    	$liftdoor2 playsound gate_iron_open3
    	$liftdoor2 waitmove
    	wait 5
    	$liftdoor2 moveeast 80
    	$liftdoor2 playsound gate_iron_open3
    	$liftdoor2 waitmove
    	$liftdoortop2 moveeast 80
    	$liftdoortop2 playsound gate_iron_open3
    	$liftdoortop2 waitmove
    end
    
    elevator1movedowna:
    	wait 2
    	$lift1 moveto $lift1_bottom
    	$lift1 playsound elevator_run
    	$lift1 waitmove
    	wait 2
    	thread elevatordoor1bottoma
    	thread elevatordoor2bottoma
    end
    
    elevatordoor1bottoma:
    	$liftdoorbottom1 moveeast 80
    	$liftdoorbottom1 playsound door_metal_close_stop4
    	$liftdoorbottom1 waitmove
    	$liftdoor1 moveeast 80
    	$liftdoor1 playsound door_metal_close_stop4
    	$liftdoor1 waitmove
    	wait 5
    	$liftdoor1 movewest 80
    	$liftdoor1 playsound door_metal_close_stop4
    	$liftdoor1 waitmove
    	$liftdoorbottom1 movewest 80
    	$liftdoorbottom1 playsound door_metal_close_stop4
    	$liftdoorbottom1 waitmove
    	thread resetelevator
    end
    
    elevatordoor2bottoma:
    	$liftdoorbottom2 movewest 80
    	$liftdoorbottom2 playsound gate_iron_open3
    	$liftdoorbottom2 waitmove
    	$liftdoor2 movewest 80
    	$liftdoor2 playsound gate_iron_open3
    	$liftdoor2 waitmove
    	wait 5
    	$liftdoor2 moveeast 80
    	$liftdoor2 playsound gate_iron_open3
    	$liftdoor2 waitmove
    	$liftdoorbottom2 moveeast 80
    	$liftdoorbottom2 playsound gate_iron_open3
    	$liftdoorbottom2 waitmove
    end
    
    failsafe1:
    	$failsafe1 waittill trigger
    	$lift1trigtop nottriggerable
    	$lift1trigbottom nottriggerable
    	thread elevator1movedowna
    end
    
    
    resetelevator:
    	$lift1trigbottom triggerable
    	$lift1trigtop triggerable
    	$failsafe1 triggerable
    	goto elevator1
    end
    
    //=====================
    //      ELEVATOR #2 SCRIPT
    //=====================
    
    elevator2:
    	$lift2door1 bind $lift2
    	$lift2door2 bind $lift2
    	$failsafe2 bind $lift2
    	$lift2 time 4
    	$lift2door1 time 1
    	$lift2door2 time 1
    	$lift2doortop1 time 1
    	$lift2doortop2 time 1
    	$lift2doorbottom1 time 1
    	$lift2doorbottom2 time 1
    	$lift2 moveto $lift2_bottom
    	$lift2 waitmove
    	thread eleswitch1b
    	thread eleswitch2b
    	thread failsafe2
    end
    
    eleswitch1b:
    	$lift2switchbottom anim off
    	$lift2trigbottom waittill trigger
    	$lift2trigtop nottriggerable
    	$failsafe2 nottriggerable
    	$lift2switchbottom anim turn
    	$lift2switchbottom playsound alarm_switch
    	$lift2switchbottom nottriggerable
    	$lift2 moveto $lift2_bottom
    	$lift2 playsound elevator_run
    	$lift2 waitmove
    	thread elevatordoor1bottomb
    	thread elevatordoor2bottomb
    end
    
    elevatordoor1bottomb:
    	$lift2doorbottom1 moveeast 80
    	$lift2doorbottom1 playsound door_metal_close_stop4
    	$lift2doorbottom1 waitmove
    	$lift2door1 moveeast 80
    	$lift2door1 playsound door_metal_close_stop4
    	$lift2door1 waitmove
    	wait 5
    	$lift2door1 movewest 80
    	$lift2door1 playsound door_metal_close_stop4
    	$lift2door1 waitmove
    	$lift2doorbottom1 movewest 80
    	$lift2doorbottom1 playsound door_metal_close_stop4
    	$lift2doorbottom1 waitmove
    	thread elevator1moveupb
    end
    
    elevatordoor2bottomb:
    	$lift2doorbottom2 movewest 80
    	$lift2doorbottom2 playsound gate_iron_open3
    	$lift2doorbottom2 waitmove
    	$lift2door2 movewest 80
    	$lift2door2 playsound gate_iron_open3
    	$lift2door2 waitmove
    	wait 5
    	$lift2door2 moveeast 80
    	$lift2door2 playsound gate_iron_open3
    	$lift2door2 waitmove
    	$lift2doorbottom2 moveeast 80
    	$lift2doorbottom2 playsound gate_iron_open3
    	$lift2doorbottom2 waitmove
    end
    
    elevator1moveupb:
    	wait 2
    	$lift2 moveto $lift2_top
    	$lift2 playsound elevator_run
    	$lift2 waitmove
    	wait 2
    	thread elevatordoor1topb
    	thread elevatordoor2topb
    end
    
    elevatordoor1topb:
    	$lift2doortop1 moveeast 80
    	$lift2doortop1 playsound door_metal_close_stop4
    	$lift2doortop1 waitmove
    	$lift2door1 moveeast 80
    	$lift2door1 playsound door_metal_close_stop4
    	$lift2door1 waitmove
    	wait 5
    	$lift2door1 movewest 80
    	$lift2door1 playsound door_metal_close_stop4
    	$lift2door1 waitmove
    	$lift2doortop1 movewest 80
    	$lift2doortop1 playsound door_metal_close_stop4
    	$lift2doortop1 waitmove
    	thread resetelevatorb
    end
    
    elevatordoor2topb:
    	$lift2doortop2 movewest 80
    	$lift2doortop2 playsound gate_iron_open3
    	$lift2doortop2 waitmove
    	$lift2door2 movewest 80
    	$lift2door2 playsound gate_iron_open3
    	$lift2door2 waitmove
    	wait 5
    	$lift2door2 moveeast 80
    	$lift2door2 playsound gate_iron_open3
    	$lift2door2 waitmove
    	$lift2doortop2 moveeast 80
    	$lift2doortop2 playsound gate_iron_open3
    	$lift2doortop2 waitmove
    end
    
    eleswitch2b:
    	$lift2switchtop anim off
    	$lift2trigtop waittill trigger
    	$lift2trigbottom nottriggerable
    	$failsafe2 nottriggerable
    	$lift2switchtop anim turn
    	$lift2switchtop playsound alarm_switch
    	$lift2switchtop nottriggerable
    	$lift2 moveto $lift2_top
    	$lift2 playsound elevator_run
    	$lift2 waitmove
    	thread elevatordoor1topc
    	thread elevatordoor2topc
    end
    
    elevatordoor1topc:
    	$lift2doortop1 moveeast 80
    	$lift2doortop1 playsound door_metal_close_stop4
    	$lift2doortop1 waitmove
    	$lift2door1 moveeast 80
    	$lift2door1 playsound door_metal_close_stop4
    	$lift2door1 waitmove
    	wait 5
    	$lift2door1 movewest 80
    	$lift2door1 playsound door_metal_close_stop4
    	$lift2door1 waitmove
    	$lift2doortop1 movewest 80
    	$lift2doortop1 playsound door_metal_close_stop4
    	$lift2doortop1 waitmove
    	thread elevator1movedownc
    end
    
    elevatordoor2topc:
    	$lift2doortop2 movewest 80
    	$lift2doortop2 playsound gate_iron_open3
    	$lift2doortop2 waitmove
    	$lift2door2 movewest 80
    	$lift2door2 playsound gate_iron_open3
    	$lift2door2 waitmove
    	wait 5
    	$lift2door2 moveeast 80
    	$lift2door2 playsound gate_iron_open3
    	$lift2door2 waitmove
    	$lift2doortop2 moveeast 80
    	$lift2doortop2 playsound gate_iron_open3
    	$lift2doortop2 waitmove
    end
    
    elevator1movedownc:
    	wait 2
    	$lift2 moveto $lift2_bottom
    	$lift2 playsound elevator_run
    	$lift2 waitmove
    	wait 2
    	thread elevatordoor1bottomc
    	thread elevatordoor2bottomc
    end
    
    elevatordoor1bottomc:
    	$lift2doorbottom1 moveeast 80
    	$lift2doorbottom1 playsound door_metal_close_stop4
    	$lift2doorbottom1 waitmove
    	$lift2door1 moveeast 80
    	$lift2door1 playsound door_metal_close_stop4
    	$lift2door1 waitmove
    	wait 5
    	$lift2door1 movewest 80
    	$lift2door1 playsound door_metal_close_stop4
    	$lift2door1 waitmove
    	$lift2doorbottom1 movewest 80
    	$lift2doorbottom1 playsound door_metal_close_stop4
    	$lift2doorbottom1 waitmove
    	thread resetelevatorb
    end
    
    elevatordoor2bottomc:
    	$lift2doorbottom2 movewest 80
    	$lift2doorbottom2 playsound gate_iron_open3
    	$lift2doorbottom2 waitmove
    	$lift2door2 movewest 80
    	$lift2door2 playsound gate_iron_open3
    	$lift2door2 waitmove
    	wait 5
    	$lift2door2 moveeast 80
    	$lift2door2 playsound gate_iron_open3
    	$lift2door2 waitmove
    	$lift2doorbottom2 moveeast 80
    	$lift2doorbottom2 playsound gate_iron_open3
    	$lift2doorbottom2 waitmove
    end
    
    failsafe2:
    	$failsafe2 waittill trigger
    	$lift2trigtop nottriggerable
    	$lift2trigbottom nottriggerable
    	thread elevator1movedownc
    end
    
    resetelevatorb:
    	$lift2trigbottom triggerable
    	$lift2trigtop triggerable
    	$failsafe2 triggerable
    	goto elevator2
    end
    
    //=========================================
    //      THE ALLIES HAVE BREACHED THE PERIMETER!
    //=========================================
    
    almost_there1:
    	//called by BSP
    	 local.player = parm.other
    	 if ( (local.player.dmteam != "allies") || (level.perimeter_breached == 1) )
    		end
    
    	 iprintlnbold "The Allies have breached the perimeter!"
    	 level.perimeter_breached = 1
    end
    
    crossing_the_bridge:
    	//called by BSP
    	 local.player = parm.other
    	 if ( (local.player.dmteam != "allies") || (level.bridge_crossed == 1) )
    		end
    
    	 iprintlnbold "The Allies are crossing the bridge!"
    	 level.bridge_crossed = 1
    end
    
    
    
    //============
    //      THE END !
    //============
    Last edited by [cB]Hanny; June 21st, 2016 at 09:45 PM.

  2. #2
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    Hey

    As far as i know, in order to play FreezeTag on a map successfully, the map.scr needs to be converted to use it. Because ftag gametype uses mefys bomb.scr and not the stock one, so yea mefys mod does affect the bombs, in ftag maps. But as you said, it should work without it aswell, has anyone else used this map before? with or without ftag?.

    EDIT: Looking at the logs, it seems the map was not finished? or just forgot certain parts to make the bomb handling better, uch as no bomb destroyed model set, or target. These things are needed for the stock obj_dm.scr::bomb_thinker part. Your better off just using mefy's bomb thinker, its the better one, especially if running ftag.

    Anyway
    Try this one, i changed it to work with ftag bomb_thinker, tested locally and seems to be fine (only played 2 rounds).
    //==========================================================================================================================
    //==========================================================================================================================
    //      MAP: G3mInI Compound
    //      ARCHITECTURE: G3mInI
    //      HACKING/SCRIPTING: G3mInI
    //      SPECIAL THANKS: ALLIEDASSAULT.COM FORUMS -- SCORPIOMIDGET FOR DECOMPILING SOME MAPS -- AND ANYONE ELSE I MAY HAVE FORGOT :)
    //      NOTE: THIS MAP SHOWS UP IN SERVER LIST AS 'COMPLEX4'
    //==========================================================================================================================
    //==========================================================================================================================
    
    //====================
    //      MAIN LEVEL SCRIPT
    //====================
    main:
        level.script = maps/obj/complex4.scr
    
        thread fogout5
        thread fogout6
        thread fogout7
        thread fogout8
        thread fogout9
    
        setcvar "g_obj_alliedtext1" "Destroy the Comm."
        setcvar "g_obj_alliedtext2" "Room. Destroy the"
        setcvar "g_obj_alliedtext3" "Battery Room"
        setcvar "g_obj_axistext1" "Defend the Comm."
        setcvar "g_obj_axistext2" "Room. Defend the"
        setcvar "g_obj_axistext3" "Battery Room"
    
        setcvar "g_scoreboardpic" "g3mini_compound"
    
        switch (waitthread global/libmef/util.scr::get_gametype)
        {
            case "ctf":
            case "ftctf":
            case "dem":
            case "ftdem":
                //waitthread setup_bases
                break
    
            case "obj":
            case "ftobj":
                thread objectivethread
                break
        }
    
        if (level.mef_gametype != "obj" && level.mef_gametype != "ftobj")
        {
            // remove the bombs in a non-objective game
            $btryroom_explode remove
            $ctrlroom_explode remove
        }
    
        level waittill prespawn
    
    
        //*** Precache Dm Stuff
        exec global/DMprecache.scr
    
        $world farplane_color ".1 .1 .12"
        level.fogplane = 2400
        $world farplane level.fogplane
    
        $spark1 hide
        $spark2 hide
        $spark3 hide
    
        exec global/alarmlight.scr
        exec global/door_locked.scr::lock
        exec global/ambient.scr complex4
        exec global/bomber.scr
    
        thread global/exploder.scr::main
        thread maps/obj/complex_minefield.scr::minefield_setup
    
        ////////////////////
        level waittill spawn
        ////////////////////
    
        fadein 4 0 0 0 1
        wait 2
    
    //==========================
    //          INITIATE LEVEL THREADS
    //==========================
        thread level_setup
        thread doors1
        thread doors2
        thread ceiling_fans
        thread fogin1
        thread fogin2
        thread fogin3
        thread fogin4
        thread random_explode1
        thread random_explode2
        thread random_explode3
        thread random_explode4
        thread random_explode5
        thread random_explode6
        thread random_explode7
        thread random_explode8
        thread random_explode9
        thread random_explode10
        thread random_explode11
        thread random_explode12
        thread flyby
        thread sparks1
        thread sparks2
        thread sparks3
        thread elevator1
        thread elevator2
    
        waitthread global/libmef/util.scr::waittill_roundstart
    
    
    
    end
    
    objectivethread:
    
        level waittill prespawn
    
        ////////////////////
        level waittill spawn
        ////////////////////
    
        level.defusing_team = "axis"
        level.planting_team = "allies"
        level.targets_to_destroy = 2
        level.bomb_damage = 200
        level.bomb_explosion_radius = 2048
    
        // set the parameters for round based match
        level.dmrespawning = 1 // 1 or 0
        level.dmroundlimit = 10 // round time limit in minutes
        level.clockside = axis // set to axis, allies, kills, or draw
    
    
        level.rain_speed = "66"
        level.rain_speed_vary = "16"
        level.rain_length = "2"
        level.rain_width = "1"
        level.rain_density = ".16"
        level.rain_slant = "250"
        level.rain_min_dist = "2800"
        //level.rain_min_dist = "512"
        level.rain_numshaders = 12
        level.rain_shader = "textures/snow1"
    
    
    //==================================
    //          WAIT FOR PLAYERS ON EACH SIDE
    //==================================
    
        waitthread global/libmef/util.scr::waittill_roundstart
    
    //=====================
    //          SETUP THE BOMBS
    //=====================
    
        $ctrlroom_explode thread global/libmef/bomb.scr::bomb_thinker
        $btryroom_explode thread global/libmef/bomb.scr::bomb_thinker
    
        thread allies_win_bomb
        $ctrlroom_explode thread axis_win_timer
    
        thread bomb1_exploded $ctrlroom_explode
        thread bomb2_exploded $btryroom_explode
    end
    
    //=======================
    //      BEGIN LEVEL THREADS
    //=======================
    
    allies_win_bomb:
    
        while(level.targets_destroyed < level.targets_to_destroy)
            waitframe
    
        waitthread global/libmef/util.scr::do_teamwin allies
    end
    
    axis_win_timer:
    
        level waittill axiswin
    
    end
    
    //=========================================
    //          COMMUNICATIONS ROOM BOMB EXPLODED
    //=========================================
    
    bomb1_exploded local.bomb1:
    
        while (local.bomb1.exploded != 1)
    
            wait .1
    
            iprintlnbold "Allies have destroyed the Communicatons Room!"
    
            $ceiling_fan1 rotatey 0
            $ceiling_fan2 rotatey 0
            $ceiling_fan3 rotatey 0
            $ceiling_fan4 rotatey 0
    end
    
    
    //=================================
    //          BATTERY ROOM BOMB EXPLODED
    //=================================
    
    bomb2_exploded local.bomb2:
    
        while (local.bomb2.exploded != 1)
    
            wait .1
    
            iprintlnbold "Allies have destroyed the Battery Room!"
    
            $ceiling_fan5 rotatey 0
            $ceiling_fan6 rotatey 0
            $ceiling_fan7 rotatey 0
            $ceiling_fan8 rotatey 0
    end
    
    //===================================
    //          SETUP THE FLASHING ALARMLIGHTS
    //===================================
    
    level_setup:
    
        level.alarmlights = 1
    
    
    //=========================================
    //      THREADS FOR ALL SCRIPTED DOORS IN LEVEL
    //=========================================
    
    doors1:
        thread door1
        thread door1a
        thread door2
        thread door2a
        thread door3
        thread door3a
        thread door4
        thread door4a
        thread door5
        thread door5a
        thread door6
        thread door6a
        thread door7
        thread door7a
        thread door8
        thread door8a
    end
    
    doors2:
        thread door9
        thread door9a
        thread door10
        thread door10a
        thread door11
        thread door11a
        thread door12
        thread door12a
        thread door13
        thread door13a
        thread door14
        thread door14a
        thread door15
        thread door15a
        thread door16
        thread door16a
    end
    
    //=================
    //      DOOR #1 SCRIPT
    //=================
    
    door1:
        $doortop1 time 1
        $doorbottom1 time 1
        $doorswitch1 anim off
        $door1 waittill trigger
        $door1a nottriggerable
        $doorswitch1 anim turn
        $doorswitch1 playsound alarm_switch
        wait .5
        thread doortop1
        thread doorbottom1
    end
    
    door1a:
        $doortop1 time 1
        $doorbottom1 time 1
        $doorswitch1a anim off
        $door1a waittill trigger
        $door1 nottriggerable
        $doorswitch1a anim turn
        $doorswitch1a playsound alarm_switch
        wait .5
        thread doortop1
        thread doorbottom1
    end
    
    doortop1:
    
        $doortop1 moveup 64
        $doortop1 waitmove
        $doortop1 playsound door_metal_close_stop4
        wait 3
        $doortop1 movedown 64
        $doortop1 waitmove
        $doortop1 playsound door_metal_close_stop4
        $door1 triggerable
        thread doors1
    end
    
    doorbottom1:
    
        $doorbottom1 movedown 64
        $doorbottom1 playsound gate_iron_open3
        $doorbottom1 waitmove
        wait 3
        $doorbottom1 moveup 64
        $doorbottom1 playsound gate_iron_open3
        $doorbottom1 waitmove
        $door1a triggerable
        thread doors1
    end
    
    //=================
    //      DOOR #2 SCRIPT
    //=================
    
    door2:
        $doortop2 time 1
        $doorbottom2 time 1
        $doorswitch2 anim off
        $door2 waittill trigger
        $door2a nottriggerable
        $doorswitch2 anim turn
        $doorswitch2 playsound alarm_switch
        wait .5
        thread doortop2
        thread doorbottom2
    end
    
    door2a:
    
        $doortop2 time 1
        $doorbottom2 time 1
        $doorswitch2a anim off
        $door2a waittill trigger
        $door2 nottriggerable
        $doorswitch2a anim turn
        $doorswitch2a playsound alarm_switch
        wait .5
        thread doortop2
        thread doorbottom2
    
    doortop2:
    
        $doortop2 moveup 64
        $doortop2 waitmove
        $doortop2 playsound door_metal_close_stop4
        wait 3
        $doortop2 movedown 64
        $doortop2 waitmove
        $doortop2 playsound door_metal_close_stop4
        $door2 triggerable
        thread doors1
    end
    
    doorbottom2:
    
        $doorbottom2 movedown 64
        $doorbottom2 playsound gate_iron_open3
        $doorbottom2 waitmove
        wait 3
        $doorbottom2 moveup 64
        $doorbottom2 playsound gate_iron_open3
        $doorbottom2 waitmove
        $door2a triggerable
        thread doors1
    end
    
    //=================
    //      DOOR #3 SCRIPT
    //=================
    
    door3:
        $doortop3 time 1
        $doorbottom3 time 1
        $doorswitch3 anim off
        $door3 waittill trigger
        $door3a nottriggerable
        $doorswitch3 anim turn
        $doorswitch3 playsound alarm_switch
        wait .5
        thread doortop3
        thread doorbottom3
    end
    
    door3a:
        $doortop3 time 1
        $doorbottom3 time 1
        $doorswitch3a anim off
        $door3a waittill trigger
        $door3 nottriggerable
        $doorswitch3a anim turn
        $doorswitch3a playsound alarm_switch
        wait .5
        thread doortop3
        thread doorbottom3
    end
    
    doortop3:
    
        $doortop3 moveup 64
        $doortop3 waitmove
        $doortop3 playsound door_metal_close_stop4
        wait 3
        $doortop3 movedown 64
        $doortop3 waitmove
        $doortop3 playsound door_metal_close_stop4
        $door3 triggerable
        thread doors1
    end
    
    doorbottom3:
    
        $doorbottom3 movedown 64
        $doorbottom3 playsound gate_iron_open3
        $doorbottom3 waitmove
        wait 3
        $doorbottom3 moveup 64
        $doorbottom3 playsound gate_iron_open3
        $doorbottom3 waitmove
        $door3a triggerable
        thread doors1
    end
    
    //=================
    //      DOOR #4 SCRIPT
    //=================
    
    door4:
        $doortop4 time 1
        $doorbottom4 time 1
        $doorswitch4 anim off
        $door4 waittill trigger
        $door4a nottriggerable
        $doorswitch4 anim turn
        $doorswitch4 playsound alarm_switch
        wait .5
        thread doortop4
        thread doorbottom4
    end
    
    door4a:
        $doortop4 time 1
        $doorbottom4 time 1
        $doorswitch4a anim off
        $door4a waittill trigger
        $door4 nottriggerable
        $doorswitch4a anim turn
        $doorswitch4a playsound alarm_switch
        wait .5
        thread doortop4
        thread doorbottom4
    end
    
    doortop4:
    
        $doortop4 moveup 64
        $doortop4 waitmove
        $doortop4 playsound door_metal_close_stop4
        wait 3
        $doortop4 movedown 64
        $doortop4 waitmove
        $doortop4 playsound door_metal_close_stop4
        $door4 triggerable
        thread doors1
    end
    
    doorbottom4:
    
        $doorbottom4 movedown 64
        $doorbottom4 playsound gate_iron_open3
        $doorbottom4 waitmove
        wait 3
        $doorbottom4 moveup 64
        $doorbottom4 playsound gate_iron_open3
        $doorbottom4 waitmove
        $door4a triggerable
        thread doors1
    end
    
    //=================
    //      DOOR #5 SCRIPT
    //=================
    
    door5:
        $doortop5 time 1
        $doorbottom5 time 1
        $doorswitch5 anim off
        $door5 waittill trigger
        $door5a nottriggerable
        $doorswitch5 anim turn
        $doorswitch5 playsound alarm_switch
        wait .5
        thread doortop5
        thread doorbottom5
    end
    
    door5a:
        $doortop5 time 1
        $doorbottom5 time 1
        $doorswitch5a anim off
        $door5a waittill trigger
        $door5 nottriggerable
        $doorswitch5a anim turn
        $doorswitch5a playsound alarm_switch
        wait .5
        thread doortop5
        thread doorbottom5
    end
    
    doortop5:
    
        $doortop5 moveup 64
        $doortop5 waitmove
        $doortop5 playsound door_metal_close_stop4
        wait 3
        $doortop5 movedown 64
        $doortop5 waitmove
        $doortop5 playsound door_metal_close_stop4
        $door5 triggerable
        thread doors1
    end
    
    doorbottom5:
    
        $doorbottom5 movedown 64
        $doorbottom5 playsound gate_iron_open3
        $doorbottom5 waitmove
        wait 3
        $doorbottom5 moveup 64
        $doorbottom5 playsound gate_iron_open3
        $doorbottom5 waitmove
        $door5a triggerable
        thread doors1
    end
    
    //=================
    //      DOOR #6 SCRIPT
    //=================
    
    door6:
        $doortop6 time 1
        $doorbottom6 time 1
        $doorswitch6 anim off
        $door6 waittill trigger
        $door6a nottriggerable
        $doorswitch6 anim turn
        $doorswitch6 playsound alarm_switch
        wait .5
        thread doortop6
        thread doorbottom6
    end
    
    door6a:
        $doortop6 time 1
        $doorbottom6 time 1
        $doorswitch6a anim off
        $door6a waittill trigger
        $door6 nottriggerable
        $doorswitch6a anim turn
        $doorswitch6a playsound alarm_switch
        wait .5
        thread doortop6
        thread doorbottom6
    end
    
    doortop6:
    
        $doortop6 moveup 64
        $doortop6 waitmove
        $doortop6 playsound door_metal_close_stop4
        wait 3
        $doortop6 movedown 64
        $doortop6 waitmove
        $doortop6 playsound door_metal_close_stop4
        $door6 triggerable
        thread doors1
    end
    
    doorbottom6:
    
        $doorbottom6 movedown 64
        $doorbottom6 playsound gate_iron_open3
        $doorbottom6 waitmove
        wait 3
        $doorbottom6 moveup 64
        $doorbottom6 playsound gate_iron_open3
        $doorbottom6 waitmove
        $door6a triggerable
        thread doors1
    end
    
    //=================
    //      DOOR #7 SCRIPT
    //=================
    
    door7:
        $doortop7 time 1
        $doorbottom7 time 1
        $doorswitch7 anim off
        $door7 waittill trigger
        $door7a nottriggerable
        $doorswitch7 anim turn
        $doorswitch7 playsound alarm_switch
        wait .5
        thread doortop7
        thread doorbottom7
    end
    
    door7a:
        $doortop7 time 1
        $doorbottom7 time 1
        $doorswitch7a anim off
        $door7a waittill trigger
        $door7 nottriggerable
        $doorswitch7a anim turn
        $doorswitch7a playsound alarm_switch
        wait .5
        thread doortop7
        thread doorbottom7
    end
    
    doortop7:
    
        $doortop7 moveup 64
        $doortop7 waitmove
        $doortop7 playsound door_metal_close_stop4
        wait 3
        $doortop7 movedown 64
        $doortop7 waitmove
        $doortop7 playsound door_metal_close_stop4
        $door7 triggerable
        thread doors1
    end
    
    doorbottom7:
    
        $doorbottom7 movedown 64
        $doorbottom7 playsound gate_iron_open3
        $doorbottom7 waitmove
        wait 3
        $doorbottom7 moveup 64
        $doorbottom7 playsound gate_iron_open3
        $doorbottom7 waitmove
        $door7a triggerable
        thread doors1
    end
    
    //=================
    //      DOOR #8 SCRIPT
    //=================
    
    door8:
        $doortop8 time 1
        $doorbottom8 time 1
        $doorswitch8 anim off
        $door8 waittill trigger
        $door8a nottriggerable
        $doorswitch8 anim turn
        $doorswitch8 playsound alarm_switch
        wait .5
        thread doortop8
        thread doorbottom8
    end
    
    door8a:
        $doortop8 time 1
        $doorbottom8 time 1
        $doorswitch8a anim off
        $door8a waittill trigger
        $door8 nottriggerable
        $doorswitch8a anim turn
        $doorswitch8a playsound alarm_switch
        wait .5
        thread doortop8
        thread doorbottom8
    end
    
    doortop8:
    
        $doortop8 moveup 64
        $doortop8 waitmove
        $doortop8 playsound door_metal_close_stop4
        wait 3
        $doortop8 movedown 64
        $doortop8 waitmove
        $doortop8 playsound door_metal_close_stop4
        $door8 triggerable
        thread doors1
    end
    
    doorbottom8:
    
        $doorbottom8 movedown 64
        $doorbottom8 playsound gate_iron_open3
        $doorbottom8 waitmove
        wait 3
        $doorbottom8 moveup 64
        $doorbottom8 playsound gate_iron_open3
        $doorbottom8 waitmove
        $door8a triggerable
        thread doors1
    end
    
    //=================
    //      DOOR #9 SCRIPT
    //=================
    
    door9:
        $doortop9 time 1
        $doorbottom9 time 1
        $doorswitch9 anim off
        $door9 waittill trigger
        $door9a nottriggerable
        $doorswitch9 anim turn
        $doorswitch9 playsound alarm_switch
        wait .5
        thread doortop9
        thread doorbottom9
    end
    
    door9a:
        $doortop9 time 1
        $doorbottom9 time 1
        $doorswitch9a anim off
        $door9a waittill trigger
        $door9 nottriggerable
        $doorswitch9a anim turn
        $doorswitch9a playsound alarm_switch
        wait .5
        thread doortop9
        thread doorbottom9
    end
    
    doortop9:
    
        $doortop9 moveup 64
        $doortop9 waitmove
        $doortop9 playsound door_metal_close_stop4
        wait 3
        $doortop9 movedown 64
        $doortop9 waitmove
        $doortop9 playsound door_metal_close_stop4
        $door9 triggerable
        thread doors2
    end
    
    doorbottom9:
    
        $doorbottom9 movedown 64
        $doorbottom9 playsound gate_iron_open3
        $doorbottom9 waitmove
        wait 3
        $doorbottom9 moveup 64
        $doorbottom9 playsound gate_iron_open3
        $doorbottom9 waitmove
        $door9a triggerable
        thread doors2
    end
    
    //==================
    //      DOOR #10 SCRIPT
    //==================
    
    door10:
        $doortop10 time 1
        $doorbottom10 time 1
        $doorswitch10 anim off
        $door10 waittill trigger
        $door10a nottriggerable
        $doorswitch10 anim turn
        $doorswitch10 playsound alarm_switch
        wait .5
        thread doortop10
        thread doorbottom10
    end
    
    door10a:
        $doortop10 time 1
        $doorbottom10 time 1
        $doorswitch10a anim off
        $door10a waittill trigger
        $door10 nottriggerable
        $doorswitch10a anim turn
        $doorswitch10a playsound alarm_switch
        wait .5
        thread doortop10
        thread doorbottom10
    end
    
    doortop10:
    
        $doortop10 moveup 64
        $doortop10 waitmove
        $doortop10 playsound door_metal_close_stop4
        wait 3
        $doortop10 movedown 64
        $doortop10 waitmove
        $doortop10 playsound door_metal_close_stop4
        $door10 triggerable
        thread doors2
    end
    
    doorbottom10:
    
        $doorbottom10 movedown 64
        $doorbottom10 playsound gate_iron_open3
        $doorbottom10 waitmove
        wait 3
        $doorbottom10 moveup 64
        $doorbottom10 playsound gate_iron_open3
        $doorbottom10 waitmove
        $door10a triggerable
        thread doors2
    end
    
    //==================
    //      DOOR #11 SCRIPT
    //==================
    
    door11:
        $doortop11 time 1
        $doorbottom11 time 1
        $doorswitch11 anim off
        $door11 waittill trigger
        $door11a nottriggerable
        $doorswitch11 anim turn
        $doorswitch11 playsound alarm_switch
        wait .5
        thread doortop11
        thread doorbottom11
    end
    
    door11a:
        $doortop11 time 1
        $doorbottom11 time 1
        $doorswitch11a anim off
        $door11a waittill trigger
        $door11 nottriggerable
        $doorswitch11a anim turn
        $doorswitch11a playsound alarm_switch
        wait .5
        thread doortop11
        thread doorbottom11
    end
    
    doortop11:
    
        $doortop11 moveup 64
        $doortop11 waitmove
        $doortop11 playsound door_metal_close_stop4
        wait 3
        $doortop11 movedown 64
        $doortop11 waitmove
        $doortop11 playsound door_metal_close_stop4
        $door11 triggerable
        thread doors2
    end
    
    doorbottom11:
    
        $doorbottom11 movedown 64
        $doorbottom11 playsound gate_iron_open3
        $doorbottom11 waitmove
        wait 3
        $doorbottom11 moveup 64
        $doorbottom11 playsound gate_iron_open3
        $doorbottom11 waitmove
        $door11a triggerable
        thread doors2
    end
    
    //==================
    //      DOOR #12 SCRIPT
    //==================
    
    door12:
        $doortop12 time 1
        $doorbottom12 time 1
        $doorswitch12 anim off
        $door12 waittill trigger
        $door12a nottriggerable
        $doorswitch12 anim turn
        $doorswitch12 playsound alarm_switch
        wait .5
        thread doortop12
        thread doorbottom12
    end
    
    door12a:
        $doortop12 time 1
        $doorbottom12 time 1
        $doorswitch12a anim off
        $door12a waittill trigger
        $door12 nottriggerable
        $doorswitch12a anim turn
        $doorswitch12a playsound alarm_switch
        wait .5
        thread doortop12
        thread doorbottom12
    end
    
    doortop12:
    
        $doortop12 moveup 64
        $doortop12 waitmove
        $doortop12 playsound door_metal_close_stop4
        wait 3
        $doortop12 movedown 64
        $doortop12 waitmove
        $doortop12 playsound door_metal_close_stop4
        $door12 triggerable
        thread doors2
    end
    
    doorbottom12:
    
        $doorbottom12 movedown 64
        $doorbottom12 playsound gate_iron_open3
        $doorbottom12 waitmove
        wait 3
        $doorbottom12 moveup 64
        $doorbottom12 playsound gate_iron_open3
        $doorbottom12 waitmove
        $door12a triggerable
        thread doors2
    end
    
    //==================
    //      DOOR #13 SCRIPT
    //==================
    
    door13:
        $doortop13 time 1
        $doorbottom13 time 1
        $doorswitch13 anim off
        $door13 waittill trigger
        $door13a nottriggerable
        $doorswitch13 anim turn
        $doorswitch13 playsound alarm_switch
        wait .5
        thread doortop13
        thread doorbottom13
    end
    
    door13a:
        $doortop13 time 1
        $doorbottom13 time 1
        $doorswitch13a anim off
        $door13a waittill trigger
        $door13 nottriggerable
        $doorswitch13a anim turn
        $doorswitch13a playsound alarm_switch
        wait .5
        thread doortop13
        thread doorbottom13
    end
    
    doortop13:
    
        $doortop13 moveup 64
        $doortop13 waitmove
        $doortop13 playsound door_metal_close_stop4
        wait 3
        $doortop13 movedown 64
        $doortop13 waitmove
        $doortop13 playsound door_metal_close_stop4
        $door13 triggerable
        thread doors2
    end
    
    doorbottom13:
    
        $doorbottom13 movedown 64
        $doorbottom13 playsound gate_iron_open3
        $doorbottom13 waitmove
        wait 3
        $doorbottom13 moveup 64
        $doorbottom13 playsound gate_iron_open3
        $doorbottom13 waitmove
        $door13a triggerable
        thread doors2
    end
    
    //==================
    //      DOOR #14 SCRIPT
    //==================
    
    door14:
        $doortop14 time 1
        $doorbottom14 time 1
        $doorswitch14 anim off
        $door14 waittill trigger
        $door14a nottriggerable
        $doorswitch14 anim turn
        $doorswitch14 playsound alarm_switch
        wait .5
        thread doortop14
        thread doorbottom14
    end
    
    door14a:
        $doortop14 time 1
        $doorbottom14 time 1
        $doorswitch14a anim off
        $door14a waittill trigger
        $door14 nottriggerable
        $doorswitch14a anim turn
        $doorswitch14a playsound alarm_switch
        wait .5
        thread doortop14
        thread doorbottom14
    end
    
    doortop14:
    
        $doortop14 moveup 64
        $doortop14 waitmove
        $doortop14 playsound door_metal_close_stop4
        wait 3
        $doortop14 movedown 64
        $doortop14 waitmove
        $doortop14 playsound door_metal_close_stop4
        $door14 triggerable
        thread doors2
    end
    
    doorbottom14:
    
        $doorbottom14 movedown 64
        $doorbottom14 playsound gate_iron_open3
        $doorbottom14 waitmove
        wait 3
        $doorbottom14 moveup 64
        $doorbottom14 playsound gate_iron_open3
        $doorbottom14 waitmove
        $door14a triggerable
        thread doors2
    end
    
    //==================
    //      DOOR #15 SCRIPT
    //==================
    
    door15:
        $doortop15 time 1
        $doorbottom15 time 1
        $doorswitch15 anim off
        $door15 waittill trigger
        $door15a nottriggerable
        $doorswitch15 anim turn
        $doorswitch15 playsound alarm_switch
        wait .5
        thread doortop15
        thread doorbottom15
    end
    
    door15a:
        $doortop15 time 1
        $doorbottom15 time 1
        $doorswitch15a anim off
        $door15a waittill trigger
        $door15 nottriggerable
        $doorswitch15a anim turn
        $doorswitch15a playsound alarm_switch
        wait .5
        thread doortop15
        thread doorbottom15
    end
    
    doortop15:
    
        $doortop15 moveup 64
        $doortop15 waitmove
        $doortop15 playsound door_metal_close_stop4
        wait 3
        $doortop15 movedown 64
        $doortop15 waitmove
        $doortop15 playsound door_metal_close_stop4
        $door15 triggerable
        thread doors2
    end
    
    doorbottom15:
    
        $doorbottom15 movedown 64
        $doorbottom15 playsound gate_iron_open3
        $doorbottom15 waitmove
        wait 3
        $doorbottom15 moveup 64
        $doorbottom15 playsound gate_iron_open3
        $doorbottom15 waitmove
        $door15a triggerable
        thread doors2
    end
    
    //==================
    //      DOOR #16 SCRIPT
    //==================
    
    door16:
        $doortop16 time 1
        $doorbottom16 time 1
        $doorswitch16 anim off
        $door16 waittill trigger
        $door16a nottriggerable
        $doorswitch16 anim turn
        $doorswitch16 playsound alarm_switch
        wait .5
        thread doortop16
        thread doorbottom16
    end
    
    door16a:
        $doortop16 time 1
        $doorbottom16 time 1
        $doorswitch16a anim off
        $door16a waittill trigger
        $door16 nottriggerable
        $doorswitch16a anim turn
        $doorswitch16a playsound alarm_switch
        wait .5
        thread doortop16
        thread doorbottom16
    end
    
    doortop16:
    
        $doortop16 moveup 64
        $doortop16 waitmove
        $doortop16 playsound door_metal_close_stop4
        wait 3
        $doortop16 movedown 64
        $doortop16 waitmove
        $doortop16 playsound door_metal_close_stop4
        $door16 triggerable
        thread doors2
    end
    
    doorbottom16:
    
        $doorbottom16 movedown 64
        $doorbottom16 playsound gate_iron_open3
        $doorbottom16 waitmove
        wait 3
        $doorbottom16 moveup 64
        $doorbottom16 playsound gate_iron_open3
        $doorbottom16 waitmove
        $door16a triggerable
        thread doors2
    end
    
    //===============================================
    //      THREADS FOR ALL SCRIPTED CEILING FANS IN LEVEL
    //===============================================
    
    ceiling_fans:
    
        thread ceiling_fan_comm_room
        thread ceiling_fan_btry_room
    end
    
    //=================================
    //     CEILING FAN COMM. ROOM #1 SCRIPT
    //=================================
    
    ceiling_fan_comm_room:
    
        $ceiling_fan1 rotatey 150
        $ceiling_fan2 rotatey 150
        $ceiling_fan3 rotatey 150
        $ceiling_fan4 rotatey 150
    
    end
    
    //=================================
    //     CEILING FAN COMM. ROOM #2 SCRIPT
    //=================================
    
    ceiling_fan_btry_room:
    
        $ceiling_fan5 rotatey 150
        $ceiling_fan6 rotatey 150
        $ceiling_fan7 rotatey 150
        $ceiling_fan8 rotatey 150
    
    end
    
    //=========================
    //      TOGGLE THE FOG THREAD
    //=========================
    fogin1:
        $fogintrig1 waittill trigger
        thread fogramp 4000
        thread fogout1
    end
    
    fogout1:
        $fogouttrig1 waittill trigger
        thread fogramp 2400
        thread fogin1
    end
    
    fogin2:
        $fogintrig2 waittill trigger
        thread fogramp 4000
        thread fogout2
    end
    
    fogout2:
        $fogouttrig2 waittill trigger
        thread fogramp 2400
        thread fogin2
    end
    
    fogin3:
        $fogintrig3 waittill trigger
        thread fogramp 4000
        thread fogout3
    end
    
    fogout3:
        $fogouttrig3 waittill trigger
        thread fogramp 2400
        thread fogin3
    end
    
    fogin4:
        $fogintrig4 waittill trigger
        thread fogramp 4000
        thread fogout4
    end
    
    fogout4:
        $fogouttrig4 waittill trigger
        thread fogramp 2400
        thread fogin4
    end
    
    fogout5:
        //println "SpawnFog trigger 5 waiting to be tripped"
        $fogouttrig5 waittill trigger
        //println "SpawnFog trigger 5 tripped"
        waitthread fogramp 2400
        goto fogout5
    end
    
    fogout6:
        //println "SpawnFog trigger 6 waiting to be tripped"
        $fogouttrig6 waittill trigger
        //println "SpawnFog trigger 6 tripped"
        waitthread fogramp 2400
        goto fogout6
    end
    
    fogout7:
        //println "SpawnFog trigger 7 waiting to be tripped"
        $fogouttrig7 waittill trigger
        //println "SpawnFog trigger 7 tripped"
        waitthread fogramp 2400
        goto fogout7
    end
    
    fogout8:
        //println "SpawnFog trigger 8 waiting to be tripped"
        $fogouttrig8 waittill trigger
        //println "SpawnFog trigger 8 tripped"
        waitthread fogramp 2400
        goto fogout8
    end
    
    fogout9:
        //println "SpawnFog trigger 9 waiting to be tripped"
        $fogouttrig9 waittill trigger
        //println "SpawnFog trigger 9 tripped"
        waitthread fogramp 2400
        goto fogout9
    end
    
    
    //=========================================================
    //      CHANGE THE FOG LEVEL WHEN ENTERING/EXITING THE COMPLEX
    //=========================================================
    
    fogramp local.rampto:
        if (level.fogplane == local.rampto)
        {
            end
        }
        if (level.fogplane < local.rampto)
        {
            for (local.bleh = level.fogplane; local.bleh < local.rampto; local.bleh += 100)
            {
                level.fogplane = local.bleh
                $world farplane level.fogplane
                wait .01
            }
            end
        }
        if (level.fogplane > local.rampto)
        {
            for (local.bleh = level.fogplane; local.bleh > local.rampto; local.bleh -= 100)
            {
                level.fogplane = local.bleh
                $world farplane level.fogplane
                wait .01
            }
            end
        }
    end
    
    
    //===============================
    //      RANDOM ARTILLERY EXPLOSIONS
    //===============================
    
    random_explode1:
    
        wait (randomfloat 13 + 23)
    
        $random_explode1_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode1 anim start
        radiusdamage $random_explode1_origin 256 384
    
        goto random_explode1
    
    random_explode2:
    
        wait (randomfloat 7 + 20)
    
        $random_explode2_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode2 anim start
        radiusdamage $random_explode2_origin 256 384
    
        goto random_explode2
    
    random_explode3:
    
        wait (randomfloat 9 + 18)
    
        $random_explode3_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode3 anim start
        radiusdamage $random_explode3_origin 256 384
    
        goto random_explode3
    
    random_explode4:
    
        wait (randomfloat 12 + 18)
    
        $random_explode4_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode4 anim start
        radiusdamage $random_explode4_origin 256 384
    
        goto random_explode4
    
    random_explode5:
    
        wait (randomfloat 15 + 22)
    
        $random_explode5_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode5 anim start
        radiusdamage $random_explode5_origin 256 384
    
        goto random_explode5
    
    random_explode6:
    
        wait (randomfloat 11 + 19)
    
        $random_explode6_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode6 anim start
        radiusdamage $random_explode6_origin 256 384
    
        goto random_explode6
    
    random_explode7:
    
        wait (randomfloat 6 + 14)
    
        $random_explode7_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode7 anim start
        radiusdamage $random_explode7_origin 256 384
    
        goto random_explode7
    
    random_explode8:
    
        wait (randomfloat 8 + 17)
    
        $random_explode8_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode8 anim start
        radiusdamage $random_explode8_origin 256 384
    
        goto random_explode8
    
    random_explode9:
    
        wait (randomfloat 7 + 14)
    
        $random_explode9_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode9 anim start
        radiusdamage $random_explode9_origin 256 384
    
        goto random_explode9
    
    random_explode10:
    
        wait (randomfloat 13 + 21)
    
        $random_explode10_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode10 anim start
        radiusdamage $random_explode10_origin 256 384
    
        goto random_explode10
    
    random_explode11:
    
        wait (randomfloat 10 + 16)
    
        $random_explode11_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode11 anim start
        radiusdamage $random_explode11_origin 256 384
    
        goto random_explode11
    
    random_explode12:
    
        wait (randomfloat 6 + 10)
    
        $random_explode12_origin playsound arty_leadinmp
    
        wait 1
    
        $random_explode12 anim start
        radiusdamage $random_explode12_origin 256 384
    
        goto random_explode12
    
    end
    
    //========================
    //      RANDOM PLANES FLYBY
    //========================
    
    flyby:
        wait 1.0
        thread global/bomber.scr::bomb 4
        thread global/bomber.scr::bomb 5
        thread global/bomber.scr::bomb 6
        thread global/bomber.scr::bomb 7
        wait (randomint(90) + 10)
    
    goto flyby
    
    end
    
    //=====================================
    //      SPARK SHOW ON POLE TRANSFORMERS
    //=====================================
    
    sparks1:
        $spark1 show
        wait 2
        $spark1 hide
        wait 4
        $spark1 show
        wait 2
        $spark1 hide
        wait 6
        goto sparks1
    end
    
    sparks2:
        $spark2 show
        wait 2
        $spark2 hide
        wait 4
        $spark2 show
        wait 2
        $spark2 hide
        wait 6
        goto sparks2
    end
    
    sparks3:
        $spark3 show
        wait 2
        $spark3 hide
        wait 4
        $spark3 show
        wait 2
        $spark3 hide
        wait 6
        goto sparks3
    end
    
    //=====================
    //      ELEVATOR #1 SCRIPT
    //=====================
    
    elevator1:
        $liftdoor1 bind $lift1
        $liftdoor2 bind $lift1
        $failsafe1 bind $lift1
        $lift1 time 4
        $liftdoor1 time 1
        $liftdoor2 time 1
        $liftdoortop1 time 1
        $liftdoortop2 time 1
        $liftdoorbottom1 time 1
        $liftdoorbottom2 time 1
        $lift1 moveto $lift1_bottom
        $lift1 waitmove
        thread eleswitch1
        thread eleswitch2
        thread failsafe1
    end
    
    eleswitch1:
        $lift1switchbottom anim off
        $lift1trigbottom waittill trigger
        $lift1trigtop nottriggerable
        $failsafe1 nottriggerable
        $lift1switchbottom anim turn
        $lift1switchbottom playsound alarm_switch
        $lift1switchbottom nottriggerable
        $lift1 moveto $lift1_bottom
        $lift1 playsound elevator_run
        $lift1 waitmove
        thread elevatordoor1bottom
        thread elevatordoor2bottom
    end
    
    elevatordoor1bottom:
        $liftdoorbottom1 moveeast 80
        $liftdoorbottom1 playsound door_metal_close_stop4
        $liftdoorbottom1 waitmove
        $liftdoor1 moveeast 80
        $liftdoor1 playsound door_metal_close_stop4
        $liftdoor1 waitmove
        wait 5
        $liftdoor1 movewest 80
        $liftdoor1 playsound door_metal_close_stop4
        $liftdoor1 waitmove
        $liftdoorbottom1 movewest 80
        $liftdoorbottom1 playsound door_metal_close_stop4
        $liftdoorbottom1 waitmove
        thread elevator1moveup
    end
    
    elevatordoor2bottom:
        $liftdoorbottom2 movewest 80
        $liftdoorbottom2 playsound gate_iron_open3
        $liftdoorbottom2 waitmove
        $liftdoor2 movewest 80
        $liftdoor2 playsound gate_iron_open3
        $liftdoor2 waitmove
        wait 5
        $liftdoor2 moveeast 80
        $liftdoor2 playsound gate_iron_open3
        $liftdoor2 waitmove
        $liftdoorbottom2 moveeast 80
        $liftdoorbottom2 playsound gate_iron_open3
        $liftdoorbottom2 waitmove
    end
    
    elevator1moveup:
        wait 2
        $lift1 moveto $lift1_top
        $lift1 playsound elevator_run
        $lift1 waitmove
        wait 2
        thread elevatordoor1top
        thread elevatordoor2top
    end
    
    elevatordoor1top:
        $liftdoortop1 moveeast 80
        $liftdoortop1 playsound door_metal_close_stop4
        $liftdoortop1 waitmove
        $liftdoor1 moveeast 80
        $liftdoor1 playsound door_metal_close_stop4
        $liftdoor1 waitmove
        wait 5
        $liftdoor1 movewest 80
        $liftdoor1 playsound door_metal_close_stop4
        $liftdoor1 waitmove
        $liftdoortop1 movewest 80
        $liftdoortop1 playsound door_metal_close_stop4
        $liftdoortop1 waitmove
        thread resetelevator
    end
    
    elevatordoor2top:
        $liftdoortop2 movewest 80
        $liftdoortop2 playsound gate_iron_open3
        $liftdoortop2 waitmove
        $liftdoor2 movewest 80
        $liftdoor2 playsound gate_iron_open3
        $liftdoor2 waitmove
        wait 5
        $liftdoor2 moveeast 80
        $liftdoor2 playsound gate_iron_open3
        $liftdoor2 waitmove
        $liftdoortop2 moveeast 80
        $liftdoortop2 playsound gate_iron_open3
        $liftdoortop2 waitmove
    end
    
    eleswitch2:
        $lift1switchtop anim off
        $lift1trigtop waittill trigger
        $lift1trigbottom nottriggerable
        $failsafe1 nottriggerable
        $lift1switchtop anim turn
        $lift1switchtop playsound alarm_switch
        $lift1switchtop nottriggerable
        $lift1 moveto $lift1_top
        $lift1 playsound elevator_run
        $lift1 waitmove
        thread elevatordoor1topa
        thread elevatordoor2topa
    end
    
    elevatordoor1topa:
        $liftdoortop1 moveeast 80
        $liftdoortop1 playsound door_metal_close_stop4
        $liftdoortop1 waitmove
        $liftdoor1 moveeast 80
        $liftdoor1 playsound door_metal_close_stop4
        $liftdoor1 waitmove
        wait 5
        $liftdoor1 movewest 80
        $liftdoor1 playsound door_metal_close_stop4
        $liftdoor1 waitmove
        $liftdoortop1 movewest 80
        $liftdoortop1 playsound door_metal_close_stop4
        $liftdoortop1 waitmove
        thread elevator1movedowna
    end
    
    elevatordoor2topa:
        $liftdoortop2 movewest 80
        $liftdoortop2 playsound gate_iron_open3
        $liftdoortop2 waitmove
        $liftdoor2 movewest 80
        $liftdoor2 playsound gate_iron_open3
        $liftdoor2 waitmove
        wait 5
        $liftdoor2 moveeast 80
        $liftdoor2 playsound gate_iron_open3
        $liftdoor2 waitmove
        $liftdoortop2 moveeast 80
        $liftdoortop2 playsound gate_iron_open3
        $liftdoortop2 waitmove
    end
    
    elevator1movedowna:
        wait 2
        $lift1 moveto $lift1_bottom
        $lift1 playsound elevator_run
        $lift1 waitmove
        wait 2
        thread elevatordoor1bottoma
        thread elevatordoor2bottoma
    end
    
    elevatordoor1bottoma:
        $liftdoorbottom1 moveeast 80
        $liftdoorbottom1 playsound door_metal_close_stop4
        $liftdoorbottom1 waitmove
        $liftdoor1 moveeast 80
        $liftdoor1 playsound door_metal_close_stop4
        $liftdoor1 waitmove
        wait 5
        $liftdoor1 movewest 80
        $liftdoor1 playsound door_metal_close_stop4
        $liftdoor1 waitmove
        $liftdoorbottom1 movewest 80
        $liftdoorbottom1 playsound door_metal_close_stop4
        $liftdoorbottom1 waitmove
        thread resetelevator
    end
    
    elevatordoor2bottoma:
        $liftdoorbottom2 movewest 80
        $liftdoorbottom2 playsound gate_iron_open3
        $liftdoorbottom2 waitmove
        $liftdoor2 movewest 80
        $liftdoor2 playsound gate_iron_open3
        $liftdoor2 waitmove
        wait 5
        $liftdoor2 moveeast 80
        $liftdoor2 playsound gate_iron_open3
        $liftdoor2 waitmove
        $liftdoorbottom2 moveeast 80
        $liftdoorbottom2 playsound gate_iron_open3
        $liftdoorbottom2 waitmove
    end
    
    failsafe1:
        $failsafe1 waittill trigger
        $lift1trigtop nottriggerable
        $lift1trigbottom nottriggerable
        thread elevator1movedowna
    end
    
    
    resetelevator:
        $lift1trigbottom triggerable
        $lift1trigtop triggerable
        $failsafe1 triggerable
        goto elevator1
    end
    
    //=====================
    //      ELEVATOR #2 SCRIPT
    //=====================
    
    elevator2:
        $lift2door1 bind $lift2
        $lift2door2 bind $lift2
        $failsafe2 bind $lift2
        $lift2 time 4
        $lift2door1 time 1
        $lift2door2 time 1
        $lift2doortop1 time 1
        $lift2doortop2 time 1
        $lift2doorbottom1 time 1
        $lift2doorbottom2 time 1
        $lift2 moveto $lift2_bottom
        $lift2 waitmove
        thread eleswitch1b
        thread eleswitch2b
        thread failsafe2
    end
    
    eleswitch1b:
        $lift2switchbottom anim off
        $lift2trigbottom waittill trigger
        $lift2trigtop nottriggerable
        $failsafe2 nottriggerable
        $lift2switchbottom anim turn
        $lift2switchbottom playsound alarm_switch
        $lift2switchbottom nottriggerable
        $lift2 moveto $lift2_bottom
        $lift2 playsound elevator_run
        $lift2 waitmove
        thread elevatordoor1bottomb
        thread elevatordoor2bottomb
    end
    
    elevatordoor1bottomb:
        $lift2doorbottom1 moveeast 80
        $lift2doorbottom1 playsound door_metal_close_stop4
        $lift2doorbottom1 waitmove
        $lift2door1 moveeast 80
        $lift2door1 playsound door_metal_close_stop4
        $lift2door1 waitmove
        wait 5
        $lift2door1 movewest 80
        $lift2door1 playsound door_metal_close_stop4
        $lift2door1 waitmove
        $lift2doorbottom1 movewest 80
        $lift2doorbottom1 playsound door_metal_close_stop4
        $lift2doorbottom1 waitmove
        thread elevator1moveupb
    end
    
    elevatordoor2bottomb:
        $lift2doorbottom2 movewest 80
        $lift2doorbottom2 playsound gate_iron_open3
        $lift2doorbottom2 waitmove
        $lift2door2 movewest 80
        $lift2door2 playsound gate_iron_open3
        $lift2door2 waitmove
        wait 5
        $lift2door2 moveeast 80
        $lift2door2 playsound gate_iron_open3
        $lift2door2 waitmove
        $lift2doorbottom2 moveeast 80
        $lift2doorbottom2 playsound gate_iron_open3
        $lift2doorbottom2 waitmove
    end
    
    elevator1moveupb:
        wait 2
        $lift2 moveto $lift2_top
        $lift2 playsound elevator_run
        $lift2 waitmove
        wait 2
        thread elevatordoor1topb
        thread elevatordoor2topb
    end
    
    elevatordoor1topb:
        $lift2doortop1 moveeast 80
        $lift2doortop1 playsound door_metal_close_stop4
        $lift2doortop1 waitmove
        $lift2door1 moveeast 80
        $lift2door1 playsound door_metal_close_stop4
        $lift2door1 waitmove
        wait 5
        $lift2door1 movewest 80
        $lift2door1 playsound door_metal_close_stop4
        $lift2door1 waitmove
        $lift2doortop1 movewest 80
        $lift2doortop1 playsound door_metal_close_stop4
        $lift2doortop1 waitmove
        thread resetelevatorb
    end
    
    elevatordoor2topb:
        $lift2doortop2 movewest 80
        $lift2doortop2 playsound gate_iron_open3
        $lift2doortop2 waitmove
        $lift2door2 movewest 80
        $lift2door2 playsound gate_iron_open3
        $lift2door2 waitmove
        wait 5
        $lift2door2 moveeast 80
        $lift2door2 playsound gate_iron_open3
        $lift2door2 waitmove
        $lift2doortop2 moveeast 80
        $lift2doortop2 playsound gate_iron_open3
        $lift2doortop2 waitmove
    end
    
    eleswitch2b:
        $lift2switchtop anim off
        $lift2trigtop waittill trigger
        $lift2trigbottom nottriggerable
        $failsafe2 nottriggerable
        $lift2switchtop anim turn
        $lift2switchtop playsound alarm_switch
        $lift2switchtop nottriggerable
        $lift2 moveto $lift2_top
        $lift2 playsound elevator_run
        $lift2 waitmove
        thread elevatordoor1topc
        thread elevatordoor2topc
    end
    
    elevatordoor1topc:
        $lift2doortop1 moveeast 80
        $lift2doortop1 playsound door_metal_close_stop4
        $lift2doortop1 waitmove
        $lift2door1 moveeast 80
        $lift2door1 playsound door_metal_close_stop4
        $lift2door1 waitmove
        wait 5
        $lift2door1 movewest 80
        $lift2door1 playsound door_metal_close_stop4
        $lift2door1 waitmove
        $lift2doortop1 movewest 80
        $lift2doortop1 playsound door_metal_close_stop4
        $lift2doortop1 waitmove
        thread elevator1movedownc
    end
    
    elevatordoor2topc:
        $lift2doortop2 movewest 80
        $lift2doortop2 playsound gate_iron_open3
        $lift2doortop2 waitmove
        $lift2door2 movewest 80
        $lift2door2 playsound gate_iron_open3
        $lift2door2 waitmove
        wait 5
        $lift2door2 moveeast 80
        $lift2door2 playsound gate_iron_open3
        $lift2door2 waitmove
        $lift2doortop2 moveeast 80
        $lift2doortop2 playsound gate_iron_open3
        $lift2doortop2 waitmove
    end
    
    elevator1movedownc:
        wait 2
        $lift2 moveto $lift2_bottom
        $lift2 playsound elevator_run
        $lift2 waitmove
        wait 2
        thread elevatordoor1bottomc
        thread elevatordoor2bottomc
    end
    
    elevatordoor1bottomc:
        $lift2doorbottom1 moveeast 80
        $lift2doorbottom1 playsound door_metal_close_stop4
        $lift2doorbottom1 waitmove
        $lift2door1 moveeast 80
        $lift2door1 playsound door_metal_close_stop4
        $lift2door1 waitmove
        wait 5
        $lift2door1 movewest 80
        $lift2door1 playsound door_metal_close_stop4
        $lift2door1 waitmove
        $lift2doorbottom1 movewest 80
        $lift2doorbottom1 playsound door_metal_close_stop4
        $lift2doorbottom1 waitmove
        thread resetelevatorb
    end
    
    elevatordoor2bottomc:
        $lift2doorbottom2 movewest 80
        $lift2doorbottom2 playsound gate_iron_open3
        $lift2doorbottom2 waitmove
        $lift2door2 movewest 80
        $lift2door2 playsound gate_iron_open3
        $lift2door2 waitmove
        wait 5
        $lift2door2 moveeast 80
        $lift2door2 playsound gate_iron_open3
        $lift2door2 waitmove
        $lift2doorbottom2 moveeast 80
        $lift2doorbottom2 playsound gate_iron_open3
        $lift2doorbottom2 waitmove
    end
    
    failsafe2:
        $failsafe2 waittill trigger
        $lift2trigtop nottriggerable
        $lift2trigbottom nottriggerable
        thread elevator1movedownc
    end
    
    resetelevatorb:
        $lift2trigbottom triggerable
        $lift2trigtop triggerable
        $failsafe2 triggerable
        goto elevator2
    end
    
    //=========================================
    //      THE ALLIES HAVE BREACHED THE PERIMETER!
    //=========================================
    
    almost_there1:
        //called by BSP
         local.player = parm.other
         if ( (local.player.dmteam != "allies") || (level.perimeter_breached == 1) )
            end
    
         iprintlnbold "The Allies have breached the perimeter!"
         level.perimeter_breached = 1
    end
    
    crossing_the_bridge:
        //called by BSP
         local.player = parm.other
         if ( (local.player.dmteam != "allies") || (level.bridge_crossed == 1) )
            end
    
         iprintlnbold "The Allies are crossing the bridge!"
         level.bridge_crossed = 1
    end
    
    
    
    //============
    //      THE END !
    //============

    EDIT:: Lol also while testing this, i came across a mod of mine that changes the bomb times, so while testing it was like 50 seconds to plant a bomb lol took awhile to test
    Last edited by Purple Elephant1au; May 24th, 2016 at 05:51 PM.

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  3. #3

    Default

    Just tested it, and it's working! Thank you for your help, Purple! I have a couple of more that I'll try fixing using mefy's bomb ticker.

    No bomb should take a minute to set.

  4. #4
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    I know, i only set it for testing purposes, the mod makes it more of a team effort to plant the bomb, and allows axis to defuse a half set bomb etc. So if one person dies while setting, the progress is saved and the next person picks up where they left off, or other team can dismantle it back to 0%

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  5. #5

    Default

    I quite like the idea of making the bomb more of a team effort. It would add more dynamic to an objective match that's for sure. I'd be interested in testing it out if you ever publish.

    I was able to use your example and fix the bombs on Boom. The two bombs would not set at all regardless of the gametype. However, I'm having complications with the third map Abbey Beta. The problem arises while playing FTOBJ. If one bomb explodes and allied team then eliminated; the map will not end, but instead prints a line saying "A bomb is still set" when the last bomb actually isn't set. The only workaround at the moment is having the axis team kill themselves to end the round. This problem does not occur while playing OBJ.

    This was my last of many attempts
    // VS-UK Abbey Assault
    // ARCHITECTURE: Kingmarzo (Dave Marsden)
    // SCRIPTING: Kingmarzo (Dave Marsden)
    
    main:
    
    switch (waitthread global/libmef/util.scr::get_gametype)
    	{
    		case "ctf":
    		case "ftctf":
    		case "dem":
    		case "ftdem":
    			waitthread setup_bases
    			break
    
    		case "obj":
    		case "ftobj":
    			thread objectivethread
    			break
    	}
    
    // set the parameters for this round based match
    	if (level.mef_gametype != "ftobj")
    	{
    		level.dmrespawning = 0 // 1 or 0
    	}
    
    setcvar "g_obj_alliedtext1" " Destroy the Radio"
    setcvar "g_obj_alliedtext2" " Room"
    setcvar "g_obj_alliedtext3" " Destroy Radio Mast"
    
    setcvar "g_obj_axistext1" " Defend the Radio"
    setcvar "g_obj_axistext2" " Room and Radio"
    setcvar "g_obj_axistext3" " Mast"
    
    setcvar "g_scoreboardpic" "vsuk-abbeybeta"
    
    	level waittill prespawn
    
    	//*** Precache Dm Stuff
    	exec global/DMprecache.scr
    
    	level.script = maps/obj/vsuk-abbeybeta.scr
    	exec global/ambient.scr m3l2
    
    	exec global/door_locked.scr::lock
    	thread global/exploder.scr::main
    
    
    	level waittill spawn
    
    	level.defusing_team = "axis"
    	level.planting_team = "allies"
    	level.bomb_damage = 200
    	level.bomb_explosion_radius = 2048
    	level.targets_to_destroy = 2
    	level.targets_destroyed = 0
    	// set the parameters for round based match
    	level.dmrespawning = 0 // 1 or 0
    	level.dmroundlimit = 5 // round time limit in minutes
    	level.clockside = axis // set to axis, allies, kills, or draw
    
        waitthread global/libmef/util.scr::waittill_roundstart
    
    
    end
    
    //=====================
    //          SETUP THE BOMBS
    //=====================
    
        $mast_explode thread global/libmef/bomb.scr::bomb_thinker
        $ctrlroom_explode thread global/libmef/bomb.scr::bomb_thinker
    
        thread allies_win_bomb
        $mast_explode thread axis_win_timer
    
        thread bomb1_exploded $mast_explode
        thread bomb2_exploded $ctrlroom_explode
    end
    
    //=======================
    //      BEGIN LEVEL THREADS
    //=======================
    
    allies_win_bomb:
    
        while(level.targets_destroyed < level.targets_to_destroy)
            waitframe
    
        waitthread global/libmef/util.scr::do_teamwin allies
    end
    
    axis_win_timer:
    
        level waittill axiswin
    
    end
    
    //=================================
    //          Top BOMB EXPLODED
    //=================================
    bomb1_exploded local.bomb1:
    
    	while (local.bomb1.exploded != 1)
    		wait .1
    
    		iprintlnbold_noloc "The Top bomb has been destroyed!"
    		level.targets_destroyed == level.targets_destroyed ++
    end
    
    
    //=========================================
    //          Bottom BOMB EXPLODED
    //=========================================
    
    bomb2_exploded local.bomb2:
    
    	while (local.bomb2.exploded != 1)
    
    		wait .1
    
    		iprintlnbold_noloc "The Bottom bomb has been destroyed!"
    		level.targets_destroyed == level.targets_destroyed ++
    
    end


    The default SCR file
    // VS-UK Abbey Assault
    // ARCHITECTURE: Kingmarzo (Dave Marsden)
    // SCRIPTING: Kingmarzo (Dave Marsden)
    
    main:
    
    switch (waitthread global/libmef/util.scr::get_gametype)
    	{
    		case "ctf":
    		case "ftctf":
    		case "dem":
    		case "ftdem":
    			waitthread setup_bases
    			break
    
    		case "obj":
    		case "ftobj":
    			thread objectivethread
    			break
    	}
    
    // set the parameters for this round based match
    	if (level.mef_gametype != "ftobj")
    	{
    		level.dmrespawning = 0 // 1 or 0
    	}
    
    setcvar "g_obj_alliedtext1" " Destroy the Radio"
    setcvar "g_obj_alliedtext2" " Room"
    setcvar "g_obj_alliedtext3" " Destroy Radio Mast"
    
    setcvar "g_obj_axistext1" " Defend the Radio"
    setcvar "g_obj_axistext2" " Room and Radio"
    setcvar "g_obj_axistext3" " Mast"
    
    setcvar "g_scoreboardpic" "vsuk-abbeybeta"
    
    	level waittill prespawn
    
    	//*** Precache Dm Stuff
    	exec global/DMprecache.scr
    
    
    
    
    	level.script = maps/obj/vsuk-abbeybeta.scr
    	exec global/ambient.scr m3l2
    
    	exec global/door_locked.scr::lock
    	thread global/exploder.scr::main
    
    
    	level waittill spawn
    
    	level.defusing_team = "axis"
    	level.planting_team = "allies"
    	level.bomb_damage = 200
    	level.bomb_explosion_radius = 2048
    
    	// set the parameters for round based match
    	level.dmrespawning = 0 // 1 or 0
    	level.dmroundlimit = 5 // round time limit in minutes
    	level.clockside = axis // set to axis, allies, kills, or draw
    
    	// level waittill roundstart
    
    
    
    		$mast_explode thread global/obj_dm.scr::bomb_thinker
    		$ctrlroom_explode thread global/obj_dm.scr::bomb_thinker
    
    		thread allies_win_bomb $mast_explode $ctrlroom_explode
    		$mast_explode thread axis_win_timer
    
    //		thread objectives_setup
    end
    
    
    allies_win_bomb local.bomb1 local.bomb2:
    
    	while (local.bomb1.exploded != 1)
    		wait .1
    	while (local.bomb2.exploded != 1)
    		wait .1
    
    	teamwin allies
    end
    
    //*** --------------------------------------------
    //*** "Axis Victory"
    //*** --------------------------------------------
    
    axis_win_timer:
    
    	level waittill axiswin
    
    end


    Any ideas?
    Last edited by [cB]Hanny; May 26th, 2016 at 03:52 PM.

  6. #6

    Default

    I have fixed now the script you only need to put like the V2 Rocket script and will work good:

    // VS-UK Abbey Assault
    // ARCHITECTURE: Kingmarzo (Dave Marsden)
    // SCRIPTING: Kingmarzo (Dave Marsden)
    
    main:
    
    setcvar "g_obj_alliedtext1" " Destroy the Radio"
    setcvar "g_obj_alliedtext2" " Room"
    setcvar "g_obj_alliedtext3" " Destroy Radio Mast"
    
    setcvar "g_obj_axistext1" " Defend the Radio"
    setcvar "g_obj_axistext2" " Room and Radio"
    setcvar "g_obj_axistext3" " Mast"
    
    setcvar "g_scoreboardpic" "vsuk-abbeybeta"
    
    	switch (waitthread global/libmef/util.scr::get_gametype)
    	{
    		case "ctf":
    		case "ftctf":
    		case "dem":
    		case "ftdem":
    			waitthread setup_bases
    			break
    
    		case "obj":
    		case "ftobj":
    			thread objectivethread
    			break
    	}
    
    
    	level waittill prespawn
    
    	//*** Precache Dm Stuff
    	exec global/DMprecache.scr
    
    
    
    
    	level.script = maps/obj/vsuk-abbeybeta.scr
    	exec global/ambient.scr m3l2
    
    	exec global/door_locked.scr::lock
    	thread global/exploder.scr::main
    
    
    	level waittill spawn
    
    	level.defusing_team = "axis"
    	level.planting_team = "allies"
    	level.targets_to_destroy = 2
    	level.bomb_damage = 200
    	level.bomb_explosion_radius = 2048
    
    	// set the parameters for round based match
    	level.dmrespawning = 0 // 1 or 0
    	level.dmroundlimit = 5 // round time limit in minutes
    	level.clockside = axis // set to axis, allies, kills, or draw
    
    	// level waittill roundstart
    
    
    
    		$mast_explode thread global/libmef/bomb.scr::bomb_thinker
    		$ctrlroom_explode thread global/libmef/bomb.scr::bomb_thinker
    
    		thread allies_win_bomb
    
    		//thread allies_win_bomb $mast_explode $ctrlroom_explode
    		$mast_explode thread axis_win_timer
    
    //		thread objectives_setup
    end
    
    
    allies_win_bomb:
    
    while(level.targets_destroyed < level.targets_to_destroy)
    		waitframe
    
    	waitthread global/libmef/util.scr::do_teamwin allies
    
    end
    
    //*** --------------------------------------------
    //*** "Axis Victory"
    //*** --------------------------------------------
    
    axis_win_timer:
    
    	level waittill axiswin
    
    end

  7. #7

    Default

    Works great, thanks PE and Double.

  8. #8

    Default

    Yes, thank you DK and Purple!

  9. #9

    Default

    Any chance you could upload the fixed maps so I can reupload them to the database?

  10. #10

    Default

    VSUK-AbbeyBeta.pk3
    g3mini_compound.pk3
    zzzBoom_FixedBombs.pk3

    There are the three maps. They're using the Mefy Mod bomb scripts though, so if someone doesn't have those bomb scripts on their server these maps won't work. Just a heads up before you replace the ones on the databse...
    Last edited by [cB]SplatterGuts; May 28th, 2016 at 12:40 PM.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •